![]() |
question for server guru---how to delete folder with many files
i want to do some cleanup on our servers.
specifically delete the folders that contain several hundred thousand small jpg files of TGP thumbs. i will use SSH now when i use regular "rm" command it times out. what's the easy way to do this---what is the command line? (delete the folder and all files in it---there might be 100K individual small jpg files within the "thumbs" folder) thanks to anyone who knows! |
rm -rf folder/
??? |
rm -rf foldername
If that gives you an error about too many files do it quick and dirty bash for i in `ls` do rm -rf $i done and wait |
dont see how rm-rf would have trouble with anything. you can delete your entire harddrive if you want with that command
|
Quote:
The smart thing would be to hire a server admin if you don't understand that concept tho :2 cents: |
Quote:
|
or just
find . -type f -exec rm {} \; two curly braces replaced by stupid board. you would have to do it in the directory you want all the files removed. |
Quote:
|
What about
cp /dev/null /folder |
thanks you guys.
OK, so in other words i, cd to the thumbs directory and then type the command below?: rm -rf folder/ |
yes, if you want to clean out /thumbs then do
rm -rf * that will empty it |
MAKING SURE YOURE IN THE "THUMBS" DIR BEFORE YOU DO THE ABOVE
|
All times are GMT -7. The time now is 10:08 PM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123