General :: Delete A Subfolder ABC From Main Project Folder?

Jul 29, 2011

I want to delete a subfolder ABC in a main Project folder Globe. It occurs in many subfolders. It is very hectic to search and issue an rm -rf ABC command. I need to make a script for that .

View 4 Replies


ADVERTISEMENT

General :: Show Folder And Only One Subfolder Using Ls In Command Line?

Jul 13, 2011

I have many folders with many subfolders. All I want it to get the folder name and the first subfolder. I tried using ls -R but this give me more than I want it. Let say I have:

dir1/subdir1/sub_1_1/file.a
dir1/subdir1/sub_1_1/file.a2
dir1/subdir1/sub_1_1/file.a3

[code]....

All I want when I execute the command is to show me:

dir1/subdir1
dir1/subdir1
dir1/subdir2

[code]....

View 4 Replies View Related

Ubuntu :: Move Folder Which Have Same Name In Subfolder?

Mar 1, 2010

How to move folder which have same name in subfolder Path : /root/Documents/untitled_folder/untitled_folder/abc.txt I want to move files from that folder how to do that

Output : /root/Documents/untitled_folder/abc.txt through terminal any idea ? and plz suggest a way to do in all folder present in directory recursevely how to check recursively in all folder's present in directory

./folder1/abc.txt
./folder1/folder1/abc.txt
./folder2/folder2/folder2/bbc.txt
./folder3/folder3/folder3/folder3/my.txt
./folder4/folder4/folder4/folder4/folder4/bcz.txt
./folder5/folder5/ca.txt

[Code]...

View 9 Replies View Related

Ubuntu :: How To Scan If There's A Subfolder In A Folder

Jun 27, 2010

I have a small bash script that compress all folders in a specific folderThe script also:- add a password to the compressed files- delete the original folder after compressionSuppose that this script is called "rar.sh".At some particular moment, there will not have any folder in the specific folder since they have all been compressed.I want something (a script?) that will check (every minute approximately) if there's new folder in the specific folder.If there's new folder, then execute script rar.shor if there's not new folder, then re-scan in the next minute.

View 2 Replies View Related

Fedora :: Allow User To Save/edit/delete Documents In A Folder But Not Delete That Folder?

Sep 6, 2011

Recently I setup a system for a non-technical user. He is only using Firefox, Pidgin and OpenOffice for about 2 hours a day. I have created a folder "/home/jim/myFiles" where he can save his document files. But Jim has accidentally deleted his myFiles folder on 2 occasions. He had intended to delete a file in that folder. Is there a way to lock the folder so that the user and create/read/write documents in that folder but not delete the folder itself?

View 14 Replies View Related

Ubuntu :: Folder Wont Delete \ Whenever Try To Press Delete Noting Happens?

May 9, 2010

SO after using Testdisk to recover some images, the folders recup_dir.1 & 2 have saved in my FIle System area, when ever I try to press delete noting happens. I have also tried rm -f -rrm -f -fIt still dont delete, I have also deleted my user account and made a new one, but the files are still there.

View 4 Replies View Related

General :: Cannot Delete A Very Large Folder?

Oct 3, 2009

I have accidentally created a very large folder that contains probably more than a million files. I have tried to delete it using all of these methods:(1) rm -rf myfolder/(2) Using midnight commander trying to delete the folder(3) find myfolder/ -type f | while read -r; do rm -v "$REPLY"; sleep 0.2; done(4) find myfolder/ -type f -print0 | xargs -0 rm -fThe find command would give an out of memory error, and other methods would just freeze the computer. I knew a few of the file names, but even if I tried to do ls myfolder/filename0, it hangs.

View 4 Replies View Related

General :: Function To Delete A Folder?

Dec 23, 2010

Is there any function to delete a folder which has few files in it ?I tried rimdir() bit it can only delete empty folders; unlink() can not delete directory entries. any other function ?

View 7 Replies View Related

Ubuntu Servers :: Samba - Access Folder To Delete Or Restore From The Recycle Bin Folder

Apr 24, 2010

I'm using ubuntu server 9.10 for a home build NAS. Everything is working great just have one more thing to figure out. I have Samba set up to access my files and I set up a recycle feature so anything deleted will get moved to a Recycled folder. (I learned this the hard way after hitting delete key by accident while browsing the shares in windows. Lost 100 GB of data)

Now it is for the most part working but the permissions on folders isn't getting set right. If I delete a file in a share I can go to Recycle bin folder and delete the file for good. But if I delete a folder I can not access that folder to delete or restore from the Recycle bin folder. I have to chmod the folder before I can do anything with it. Anything I can change to get folders deleted via windows to have the right permissions when it is moved to the Recycle bin folder?

[Code]///

View 1 Replies View Related

Ubuntu :: Hidden Cache Folder In Home Folder - Safe To Delete?

Jun 8, 2011

upon browsing the home folder in my ubuntu system, i came across a hidden cache folder..

it occupied around 700 mb of space..and im falling short of space..

can i delete the contents in the folder? are they safe to delete?

View 5 Replies View Related

Programming :: Making A Project Distribution Folder?

Jun 25, 2010

I'm trying to make my first c project (a simple tic tac toe console game), and I am wondering how to make a final product (copy all source code files to a distribution folder upon compilation). Should I use a bash script or should I use a makefile to make the distribution folder? I'm not terrible familiar with either; I have a basic makefile to make an executable, and that's about all I know of make.

And if I do use a bash script, how do I copy over source code files? I tried cp ./*.c and cp ./*.h, but I think the script read it literally as moving a file named ./*.c (and ./*.h), and couldn't find it.

My makefile is pretty much this:

Code:
objectFiles = main.o io.o board.o game.o
ttt : $(objectFiles)
cc -o ttt $(objectFiles)

View 2 Replies View Related

General :: Delete Files In Folder Before Todays Date?

Sep 14, 2009

I currently have a command to backup a directory it will zip the directoryand place it where i have told it too, Now what i am after is a command i can run before my code, that will delete and tar.gz files before todays dateso i my ideal world it would be something like this, delete <'date +%m_%d_%y'.tar so this will delete all the files in this folder before todays date,

View 1 Replies View Related

Ubuntu :: How To Change Project Folder Icon In Places

Aug 29, 2010

I have a folder in my Home folder and called "Projects". I want to change the icon of the folder Project so the icon changed in everywhere. In "Places", Open Dialogs, Save Dialogs and Normal View in Nautilus.

What I have done:
Change the icon using Right-Click -> Properties -> Basic Tab -> Clicked the current icon and changed it.

But this changed it only in Nautilus. If I added this folder to "Places" it will appear with the Default icon. The same thing if I browsed to it using Open Dialogs or Save Dialogs.

View 5 Replies View Related

Ubuntu :: Delete Remaster Folder From Home Folder?

Jun 13, 2011

I have Ubuntu Jaunty 9.04 updated to 9.10 and have downloaded Remaster from Remastersys. I followed all of the instructions, which were simple enough. However, there must be some instructions missing as the process failed. Working with Remaster through Synaptic Manager, the iso was downloaded into my "home" folder into its own Remaster folder. It was not the iso, like you get when downloading a distro from the Internet, which downloads just an iso onto the Desktop. Inside the folder were a bunch of empty files (I know, because I opened them) and an iso . At this point the Remaster instruction stop. They do not say what to do with the other files, or what they have to do with the iso of my Ubuntu layout. So, like any other iso (once I knew which one was the iso of my setup), I double clicked on it and it ran me through the process of accessing the DVD to burn it. Which I did. I tested it and it failed with some kind of message to the effect that certain files were missing or it could not read it. So, I thought, I would have to do the 'hunt and peck' method and experiment a few times like I did with the ordinary distro downloads until I get it right. But first, I would have to dump the Remaster folder in the "home" folder since it took up so much space on my hard drive. Wrong! I come to find out it is in something called "root" and that I do not have permission to do anything with it but "copy" it. Great. Just great! Now what do I do. I tried to change permissions, but was not allowed to do that either. The only thing I could think of - and dread - was the idea of having to wipe my hard drive and go through the whole reinstall procedures, which takes me days, just because Remaster has locked itself into my system - and there is no 'back door' to get out of it.

View 9 Replies View Related

General :: Ubuntu Server - Restrict User To Delete One Folder

Jun 24, 2011

I want to limit delete of a particular folder in the user's home folder and to restrict any add/change/delete on files in that restricted directory.
/home/myuser
/home/myuser/_protected //no delete
/home/myuser/_protected/1.txt //only read
How can I do that on Ubuntu server?

View 1 Replies View Related

General :: Nokia N900 - Delete A File Or Folder Via Apt-get Remove

Feb 25, 2011

how to delete a file or folder via apt-get remove but my written any rates and stops also tried rm and the file name again failed some sort of ideas otherwise I'm with Nokia n900

View 10 Replies View Related

Ubuntu :: Add / Edit And Delete Menus In The 11.04 Main Menu?

May 5, 2011

When I was using Ubuntu 10.10 I was able to add menus, edit and delete them from the main menu by right clicking on the menu and selecting Edit menus [URL]. After installing Ubuntu 11.04, I found that I can't add, edit or delete any menu. Any one knows how to add, edit and delete menus from the main menu?

View 2 Replies View Related

General :: Get Last Subfolder On A Path?

Jul 29, 2011

I create a bash script and I assign a folder variable like:

#!/bin/bash
....
Myvariable_FOLDER_PATH=/PATH/TO/SPECIFIC/SUBFOLDER

is there any way to make another variable with just the specific SUBFOLDER

(?some command?)----> will make My_variable_subfolder = SUBFOLDER

so if I do

echo $Myvariable_FOLDER_PATH

i get: /PATH/TO/SPECIFIC/SUBFOLDER

and echo $My_variable_subfolder

i get: /SUBFOLDER

The tree and path names will change so I jjust want the last subfolder that I will access to access its files.

View 3 Replies View Related

Ubuntu :: Unfortunately Delete The Bottom Main Panel And Cant Access Any Thing?

Jan 9, 2011

just install kde in ubuntu couple of hours ago.i was just checking the panels and widgets.unfortunately i delete the bottom main panel. so i cant access any thing.just desktop is seen.without kde bottom panel kde is useless.its looks like this.snapshot1.pngwhat can i do. i want it to default position ?

View 1 Replies View Related

General :: Upload File To The Subfolder?

Mar 21, 2011

why I cannot upload local files to subfolder in my home folder on FTP server? Say, i wanna upload files to /home/haolh/trial/occ/src/occ, but following error msg were given...

commandput "C:Proj rialoccsrcocc" "occ"
error/home/haolh/trial/occ/src/occ: open for write: permission denied

After google this prob, i've tried commands as below but it still failed

chmod 770 /home/haolh/
chown root:haolh /home/haolh/

View 2 Replies View Related

Ubuntu :: Delete Folders And Files From Main Installation From When Booted From Live Cd?

Sep 29, 2010

I'm getting permission errors. Delete folders and files from main installation from when booted from live cd?

View 9 Replies View Related

General :: Finding A Recursive Shell Or Perl Script To Delete Files With The Same Name As The Parent Folder?

Jun 29, 2010

is there a recursive shell or Perl script to delete files with the same name as the parent folder? i wish to include the starting folder name as argument to the script.

View 2 Replies View Related

General :: Call Another Bash Script To Run On A Subfolder?

Sep 29, 2010

I want my bash script to run scripts located on a different folder. If it is also located on the same folder with my script, it will go like this:

on my $HOME folder: (this_script.sh, backup.sh, restore.sh, purge.sh)
#!/bin/bash
./backup.sh
./restore.sh
./purge.sh

But what if, on my $HOME folder: (this_script.sh)

$HOME/scripts folder: ( backup.sh,restore.sh, purge.sh )

Below doesn't work...

#!/bin/bash
./$HOME/scripts/backup.sh

View 5 Replies View Related

General :: User Write In A Subfolder When Can't Access Parent?

Jul 13, 2010

I was wondering, i have a webfolder and have permissions set to 770 with group being www-data. I would like to give access to one folder to a friend so he can edit images, css, etc. I made that folder 770 with group being site_name with www-data and him being in the group. So far so good it sounds like. However when i use the full path to the directory linux says it doesnt exist.

Is there a way i can make it so he doesnt have r/w file on files inside the parent directories and still access the directory i want to give him?

View 1 Replies View Related

General :: Zip -x For A Directory - Subfolder Contents Not Being Excluded Recursively?

Dec 9, 2010

I am attempting to use the zip command with the '-x' option to exclude a folder e.g. 'zip upload.zip public_html -x public_html/jquery/*'. However, parts of this folder are still being added to the archive. I made a shell script (saved as 'compress.sh' and ran as '. compress.sh') to do the archiving so I could test adding nested wildards for multiple subfolder levels.

Code:

#!/bin/bash
rm -f upload.zip
zip -r upload.zip public_html
-x public_html/jquery

[code]....

Each new line I added here that has the nested wildcards made the archive file size a bit smaller. Adding more /*'s than this didn't affect the file size. Even after all this though, there were still a couple megabytes of files and folders from the 'jquery' directory that were added to the archive.

Here's some examples of files and folders that were created after I unzipped the archive:
public_html/jquery/js/tablesorter/addons/pager/icons [folder]
public_html/jquery/js/tablesorter/addons/pager/.svn/entries [file]
public_html/jquery/js/tablesorter/build/.svn/text-base/js.jar.svn-base [file]

Why is it that despite all the -x lines, the files and folders like these were still being added to the archive? How can I simply recursively exclude the entire public_html/jquery folder from the archive?

View 4 Replies View Related

Ubuntu :: Documents Folder Vanished In Main Tool Bar?

Jul 20, 2011

i'm using Maverick 10.10 and have noticed my Documents folder that should be in the above --Places link has just vanished today. No commands have been run this week. The only update i had was yesterday with new headers and kernels for x86 64.

View 4 Replies View Related

Ubuntu :: Deleted User Main Folder - How To Restore Using Root Shell

Apr 14, 2011

I have system that was cloned from another system hence the user was same in both computer. I changed the computer name - to TANU. Then I added another user - BANU. I gave admin rights to second user. Logged out the first user DON- who is now only the desktop user. Before deleting the account through users and groups - I deleted the folder DON from home folder. I restarted the comp. unable to login. I had created automatic login for both users. How to restore the folder DON while using root shell.

View 2 Replies View Related

General :: Delete "locked" Folder And Contents?

Apr 18, 2010

i locked a folder of pictures on my linux and now want to delete them, but it wont even let me open the folder or do anything with it, what do i do to unlock it then delete i

View 5 Replies View Related

Ubuntu :: In The System-prefenrences-main Manu,i Delete Accessories, Revovery My Accessories?

Aug 12, 2011

in the system-prefenrences-main manu,i delete Accessories,how to revovery my accessories??

View 1 Replies View Related

Ubuntu / Apple :: Throw ReFit Into Main Hard Drive's Root Folder But Doesn't Work

Dec 7, 2010

I have a Macbook 2,1 since 2007. Last week my hard drive just died, so I decided to replace it with a new one, no problems with that. The problem came when I had to install an operative system, because my DVD drive has been broken for a year and a half now. I know we can easily install MacOSX from an external usb drive, but I don't have a big enough pendrive at the moment. So I went for Ubuntu. I have managed to get an Ubuntu 10.10 live usb stick working like charm, if anyone is interested. I just downloaded the latest i386 iso and followed this advice by pxwpxw for the 32bit EFI.

The only thing I had to change in the boot.cfg was the name of the iso and -very important- changed initrd.gz for initrd.lz. The live usb works great. But I decided to do an installation on the hard drive. I installed it using the whole hard drive and didn't get any errors. But when I boot the macbook it doesn't detect anything. I guess I need an EFI bootloader or something to make it work. I've tried to follow this guide but it seems to be intended for someone who already has MacOSX and the Ubuntu installation working. I just want to install a bootloader or whatever I need from the "outside" (from the live usb I'm using). I tried to just throw reFit into the main hard drive's root folder but it doesn't work. I think that maybe creating an HFS+ partition and installing reFit in it may work, but I don't think I can create that kind of partition from the Ubuntu usb and I also need a working MacOSX to run the enable.sh. I've also read of elilo but I've seen that it hasn't been updated for 3 years

View 4 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved