LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   bash question (https://www.linuxquestions.org/questions/linux-software-2/bash-question-797845/)

mrmnemo 03-25-2010 01:17 PM

bash question
 
can i use rm -r against a list created with
Code:

find -R /dir/*.part!;rm -r *.part! << removelist.homemachine
i am just trying to get rid of a bunch of partial files

Vrajgh 03-25-2010 02:07 PM

The particular commands you have provided won't help you very much. As far as I can tell from find's man page, it doesn't have a -R option. Also you seem to be trying to do something strange with rm - giving it a wildcard argument is fine but it doesn't read files to be removed from stdin.

I suggest you read this page which google found for me:
http://www.cyberciti.biz/faq/linux-u...-remove-files/

Post back here if you need more help. May I suggest that you fill a temporary directory with files and test your command first, or at least make sure find is finding the correct files before adding rm to the command line. Running scripts or commands with rm in them when you aren't sure exactly what they do can land you in all sorts of trouble!

mrmnemo 03-25-2010 02:28 PM

thanmks man. you know your the first to suggest a temp file b4 running anything against a real directory. cant believe i didnt think of that. thanks again.

EDIT: find -R is supposed do a recursive search i thought.

mrmnemo 03-25-2010 07:42 PM

i ended up just using rm -r with a wild card as i could not get find to perom the job correctly. thanks again


All times are GMT -5. The time now is 02:44 PM.