![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| remove old files from a directory | 2davidc8 | UNIX for Dummies Questions & Answers | 2 | 07-03-2007 02:06 PM |
| Find all files created by a specified user in a directory and its subdirectories | abhilashnair | UNIX for Dummies Questions & Answers | 5 | 06-13-2007 02:37 AM |
| searching files through all subdirectories beneath the current directory | milagros | Shell Programming and Scripting | 5 | 05-15-2007 04:00 PM |
| list largest files in a directory & its subdirectories | igidttam | UNIX for Dummies Questions & Answers | 6 | 09-25-2006 11:31 AM |
| How to Remove Ctrl M characters in files from directories and its subdirectories | skdp | Shell Programming and Scripting | 7 | 07-29-2006 11:53 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
How to remove directory with subdirectories and files?
I'm trying to remove several directories which contains sun-dirs and files inside.
I used the command rm -r <dirname> But, it always ask "examine file in directory <dirname> yes/no?" line by line. So, i need to write "y" for every line. How can i skip this step and remove all directories with asking confirmation? Thank you. |
|
||||
|
I have a similar problem. I have a directory with *LOTS* of hidden files (beginning with a . )
In this case when I use rm -rf, I get the error: rm: Unable to remove directory dir0: File exists The thing is, I do not know where did all those files come from.. I think I did an nfs mount and something went wrong.. and these random files keep getting produced -rwxrwxrwx 1 root engr 8192 May 5 20:35 .nfsD355* -rwxrwxrwx 1 root engr 8192 May 5 20:35 .nfsD455* -rwxrwxrwx 1 root engr 8192 May 5 20:35 .nfsD845* -rwxrwxrwx 1 root engr 8192 May 5 20:35 .nfsD945* -rwxrwxrwx 1 root engr 8192 May 5 20:35 .nfsDA45* -rwxrwxrwx 1 root engr 8192 May 5 20:35 .nfsDB45* -rwxrwxrwx 1 root engr 8192 May 5 20:35 .nfsDC45* -rwxrwxrwx 1 root engr 8192 May 5 20:35 .nfsDD45* -rwxrwxrwx 1 root engr 8192 May 5 20:35 .nfsDE45* -rwxrwxrwx 1 root engr 8192 May 5 20:35 .nfsDF45* -rwxrwxrwx 1 root engr 8192 May 5 20:35 .nfsE055* -rwxrwxrwx 1 root engr 8192 May 5 20:35 .nfsE155* -rwxrwxrwx 1 root engr 8192 May 5 20:35 .nfsE255* -rwxrwxrwx 1 root engr 8192 May 5 20:35 .nfsE355* -rwxrwxrwx 1 root engr 8192 May 5 20:35 .nfsE455* -rwxrwxrwx 1 root engr 8192 May 5 20:35 .nfsE845* -rwxrwxrwx 1 root engr 8192 May 5 20:35 .nfsE945* -rwxrwxrwx 1 root engr 8192 May 5 20:35 .nfsEA45* -rwxrwxrwx 1 root engr 8192 May 5 20:35 .nfsEB45* -rwxrwxrwx 1 root engr 8192 May 5 20:35 .nfsEC45* -rwxrwxrwx 1 root engr 8192 May 5 20:35 .nfsED45* -rwxrwxrwx 1 root engr 8192 May 5 20:35 .nfsEE45* -rwxrwxrwx 1 root engr 8192 May 5 20:35 .nfsEF45* even in dir0, rm .nfs* does not work. |
|
||||
|
Quote:
typically, rm -rf dir0 should work, even if there are hidden files inside dir0, as long as you have permissions to erase files in the current directory. |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|