Web Hosting Talk







View Full Version : NEED Help removing these files


ClusterMania
05-23-2002, 02:03 AM
I tried these commands but the files are still on harddrive =/ Sometimes I get su: /bin/rm: Argument list too long

I even tried logging in as root

I attached a file with all illegal files. These commands don't work.

rm -f /usr/local/psa/home/vhosts/httpdocs/*/AGF2nd*
rm -f /usr/local/psa/home/vhosts/httpdocs/*/kyohaku_01*
rm -f /usr/local/psa/home/vhosts/httpdocs/*/kyohaku_01_a*
rm -f /usr/local/psa/home/vhosts/httpdocs/*/kyohaku_02*
rm -f /usr/local/psa/home/vhosts/httpdocs/*/kyohaku_02_a*
rm -f /usr/local/psa/home/vhosts/httpdocs/*/kyohaku_03*
rm -f /usr/local/psa/home/vhosts/httpdocs/*/kyohaku_04_a*
rm -f /usr/local/psa/home/vhosts/httpdocs/*/kyohaku_02_*
rm -f /usr/local/psa/home/vhosts/httpdocs/*/elfan_2_a*
rm -f /usr/local/psa/home/vhosts/httpdocs/*/elfan_1_a*
rm -f /usr/local/psa/home/vhosts/httpdocs/*/zeroone_a*
rm -f /usr/local/psa/home/vhosts/httpdocs/*/kango2_install*
rm -f /usr/local/psa/home/vhosts/httpdocs/*/wind_disc1*
rm -f /usr/local/psa/home/vhosts/httpdocs/*/wind_disc2*
rm -f /usr/local/psa/home/vhosts/httpdocs/*/eroken_1*
rm -f /usr/local/psa/home/vhosts/httpdocs/*/eroken_2*
rm -f /usr/local/psa/home/vhosts/httpdocs/*/mikoava_a*
rm -f /usr/local/psa/home/vhosts/httpdocs/*/mikoava_b*
rm -f /usr/local/psa/home/vhosts/httpdocs/*/mikoava_c*
rm -f /usr/local/psa/home/vhosts/httpdocs/*/kuraemon0*

priyadi
05-23-2002, 09:04 AM
Try this (untested) code:


cd /usr/local/psa/home/vhosts/
cat mpg.txt | xargs rm -f

ClusterMania
05-24-2002, 03:19 AM
I am scared to try untest code =/

phpjames
05-24-2002, 05:58 AM
This should work. Edit the .txt file with 3 or 4 sample files you create and see if they get removed. If they do rerun it with the originial txt file and it will work just fine.

priyadi
05-24-2002, 09:35 PM
Originally posted by ClusterMania
I am scared to try untest code =/

If you are so scared trying out things, try putting an 'echo' before any dangerous command. In this case, the code becomes:


cat mpg.txt | xargs echo rm -f