Portal Home > Knowledgebase > Articles Database > delete command

delete command

Posted by Bahaa Ajbaa, 02-24-2008, 11:52 AM
hi guys can i activate the deletion command for 10 or 30 mins and then stop it ? i think by this way we cant delete some files from the dir and not all the files so i can edit my files i want to do this because my server doesnt respond to any file system command because my hardisk is full !! so i need to remove some files by any way so please help me if u can

Posted by Patrick, 02-24-2008, 01:22 PM
That's not a real fix... do you know what partitions are full? df -h Depending on the partition, it could be old core files, log files, etc... othewise you may have to add a larger hard drive.

Posted by Bahaa Ajbaa, 02-24-2008, 06:43 PM
Filesystem Size Used Avail Use% Mounted on /dev/mapper/VolGroup00-LogVol00 686G 653G 0 100% / how can i delete those things you told ? (logs) (old core files) etc..

Posted by activelobby4u, 02-24-2008, 10:35 PM
Whats the error when u try to delete the file. You can even try to emply files using >filename try it

Posted by Bahaa Ajbaa, 02-24-2008, 11:20 PM
Argument list too long < this is the error

Posted by Bahaa Ajbaa, 02-24-2008, 11:24 PM
so how can i delete those things you told ? (logs) (old core files) etc

Posted by activelobby4u, 02-24-2008, 11:27 PM
try these 1. cd 2. rm -rf [a-q]* (change the regular expression according to your requirements) 3. If 2 does nt work out for i in `ls` do rm -rf $i done PS : make sure you delete the unnecessary files only.

Posted by Bahaa Ajbaa, 02-24-2008, 11:38 PM
ok but how i can find the logs folder ?

Posted by markhard, 02-24-2008, 11:40 PM
i got that error message when i try to delete a lot of log files at once. try reduce the number you want to delete at one time.

Posted by activelobby4u, 02-24-2008, 11:41 PM
usually /var/log please remove the -r option from rm as there would be folders inside the /var/log directory so the commands can be restated as 1. cd 2. rm -f [a-q]* (change the regular expression according to your requirements) 3. If 2 does nt work out for i in `ls` do rm -f $i done

Posted by markhard, 02-24-2008, 11:43 PM
usually at /var/log

Posted by Bahaa Ajbaa, 02-25-2008, 07:51 AM
i have delete all the files in log folder still my hardisk out of space what i can do ?

Posted by HoundOfTheSmith, 02-25-2008, 11:14 AM
Start in / and then do: du -csk * | sort -n | tail -n 5 That will give you the 5 directories/files taking up the most disk space. If the largest user of disk space is a directory cd into it and repeat the command. Keep going until you find the offending file(s). If you're really, really, in a hurry to blow away all your log files then do: find /var/log -type f -exec rm {} \; This will delete every file under var log, probably including ones you didn't want to delete

Posted by devonblzx, 02-25-2008, 01:08 PM
You should hire a management company to help resolve it for you. You need to find where the space is being used, not just delete random files.

Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read
Apache ddos (Views: 304)


Customer Testimonials

John Doe
It's a great service with fantastic support. It's definately good value for your money. Overall rating, 10 out of 10.
Mike Smith
Much better than my previous hosting company - I also got help with migration at no extra cost. Friendly support too.
Copyright © 2015 DC International LLC in partnership with Bragin IT Solutions Inc. - All Rights Reserved.