Computing.Net > Forums > Linux > Deleting files

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Deleting files

Reply to Message Icon

Name: Linux man
Date: October 18, 2000 at 16:17:36 Pacific
Comment:

Hi,

Can anyone give me a fast and easy way of deleteing files and directories quick.

I have had enough of going through each directory deleting all the files then deleteing the directories.

Surely this must annoy everyone.

Thanks in advance



Sponsored Link
Ads by Google

Response Number 1
Name: D. Simmons
Date: October 18, 2000 at 17:18:50 Pacific
Reply:

cd to the top level directory you want to delete (call it old_stuff). Use the command "/bin/rm -Rf * .??*", then cd .. , Finally "rmdir old_stuff". The extra cd's aren't necessary but they are a good CYA.


0

Response Number 2
Name: Jac
Date: October 20, 2000 at 07:44:06 Pacific
Reply:

If it prompts for each file, put a \ in front of the command, or add -i to toggle off the interactive stuff.


0

Response Number 3
Name: gavx
Date: October 23, 2000 at 14:35:45 Pacific
Reply:

yeah or,

(if the dir is 'junk")

$rm -r /junk

or

$rmdir -r /junk

The -r tells it to recrsicely delete it. rmdir will complain that the dir isnt empty so i use rm -r.


0

Response Number 4
Name: beavis
Date: November 28, 2000 at 19:22:48 Pacific
Reply:

Why don't you just go to the top level and do

$ rm -rf *

That's it. This will remove files and directories in one command without prompting.


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Linux Forum Home


Sponsored links

Ads by Google


Results for: Deleting files

restore deleted files on Linux www.computing.net/answers/linux/restore-deleted-files-on-linux/3636.html

Deleting Files that are older than 7 days www.computing.net/answers/linux/deleting-files-that-are-older-than-7-days/1074.html

wierd problem deleting files www.computing.net/answers/linux/wierd-problem-deleting-files/23025.html