![]() |
![]() |
![]() |
||||
Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
![]() ![]() |
|
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
Thread Tools |
![]() |
#1 |
Confirmed User
Join Date: Oct 2003
Posts: 3,191
|
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! |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#2 |
Guest
Posts: n/a
|
rm -rf folder/
??? |
![]() ![]() ![]() ![]() ![]() |
![]() |
#3 |
Confirmed User
Join Date: Jan 2004
Location: Cleveland & Atlanta
Posts: 6,706
|
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
__________________
![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#4 |
Guest
Posts: n/a
|
dont see how rm-rf would have trouble with anything. you can delete your entire harddrive if you want with that command
|
![]() ![]() ![]() ![]() ![]() |
![]() |
#5 | |
Confirmed User
Join Date: Jan 2004
Location: Cleveland & Atlanta
Posts: 6,706
|
Quote:
The smart thing would be to hire a server admin if you don't understand that concept tho ![]()
__________________
![]() |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#6 | |
Confirmed User
Join Date: Jan 2004
Location: Cleveland & Atlanta
Posts: 6,706
|
Quote:
__________________
![]() |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#7 |
Confirmed User
Join Date: Mar 2004
Location: Dallas
Posts: 874
|
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. |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#8 | |
Confirmed User
Join Date: Mar 2004
Location: Dallas
Posts: 874
|
Quote:
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#9 |
Confirmed User
Industry Role:
Join Date: Sep 2002
Location: San Francisco, California
Posts: 991
|
What about
cp /dev/null /folder |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#10 |
Confirmed User
Join Date: Oct 2003
Posts: 3,191
|
thanks you guys.
OK, so in other words i, cd to the thumbs directory and then type the command below?: rm -rf folder/ |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#11 |
Confirmed User
Join Date: Oct 2004
Location: Boston, MA
Posts: 1,723
|
yes, if you want to clean out /thumbs then do
rm -rf * that will empty it
__________________
![]() ICQ# 273099174 - monthly specials - 2 Month Free Credit on All Plans - 100% Referrals - chris@ for details Virtual from $14.95/month, Dedicated from $149.95/month Dual-Core Xeon > 1000GB @ $149.95 | 1500GB @ $169.95 | 10Mbps @ $269.95 |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#12 |
Registered User
Join Date: Jun 2004
Location: Right At Home
Posts: 72
|
MAKING SURE YOURE IN THE "THUMBS" DIR BEFORE YOU DO THE ABOVE
|
![]() |
![]() ![]() ![]() ![]() ![]() |