Re: rm -r/-R/--recursive doesn't seem to work
find . -name TRANS.TBL -exec rm {} \; alternatively you could use: rm `find . -name TRANS.TBL` which would have some advantages regarding speed system usage, as rm wouldn't be called individually for each file, but rather once for all files. Benedikt signoff --- Benedikt Eric Heinen - Muehlemattstrasse 53 - CH3007 Bern - SWITZERLAND email: [EMAIL PROTECTED]phone: ++41.79.3547891 RIOT, n. A popular entertainment given to the military by innocent bystanders. Ambrose Bierce ``The Devil's Dictionary'' -- TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word unsubscribe to [EMAIL PROTECTED] . Trouble? e-mail to [EMAIL PROTECTED]
rm -r/-R/--recursive doesn't seem to work
I just built a distribution tree from a CD on my hard disk. I tried to remove all the TRANS.TBL files from the tree by using: rm -r TRANS.TBL If I do this in a directory that has a TRANS.TBL it, and only it, gets removed. If I do this in an upper directory without a TRANS.TBL file, I get the error no such file or directory Am I doing something wrong, or is this a bug in rm? TIA, Dwarf -- aka Dale Scheetz Phone: 1 (904) 656-9769 Flexible Software 11000 McCrackin Road e-mail: [EMAIL PROTECTED] Tallahassee, FL 32308 If you don't see what you want, just ask -- -- TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word unsubscribe to [EMAIL PROTECTED] . Trouble? e-mail to [EMAIL PROTECTED]
Re: rm -r/-R/--recursive doesn't seem to work
On Tue, 31 Dec 1996, Dale Scheetz wrote: Hi Zwerg, I just built a distribution tree from a CD on my hard disk. I tried to remove all the TRANS.TBL files from the tree by using: rm -r TRANS.TBL Am I doing something wrong, or is this a bug in rm? TIA, Dwarf You missunderstodd the purpose of 'rm -r' This command lets you recursively remove a directory structure like 'rm -rf /home'. Please have a look at 'man find' 'man rm' After checking these man pages you might be enlighted. If you really cannot figure it out yourself then pleas contact me directly. I will then mail you the command line. Yours, -- martin // Martin Konold, Muenzgasse 7, 72070 Tuebingen, Germany // // Email: [EMAIL PROTECTED] // Linux - because reboots are for hardware upgrades -- Edwin Huffstutler [EMAIL PROTECTED] -- Just go ahead and write your own multitasking multiuser os ! Worked for me all the times. -- Linus Torvalds -- -- TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word unsubscribe to [EMAIL PROTECTED] . Trouble? e-mail to [EMAIL PROTECTED]
Re: rm -r/-R/--recursive doesn't seem to work
I just built a distribution tree from a CD on my hard disk. I tried to remove all the TRANS.TBL files from the tree by using: rm -r TRANS.TBL If I do this in a directory that has a TRANS.TBL it, and only it, gets removed. If I do this in an upper directory without a TRANS.TBL file, I get the error no such file or directory Am I doing something wrong, or is this a bug in rm? Dwarf: try this: find . -name TRANS.TBL -exec rm \{\} \; (you need the backslashes to escape {} ; because these have special meaning in the bash shell - see find(1) for more details on the -exec parameter of the find command) Them rm -R command does do what you want. I have used it to delete an entire subdirectory structure as in: rm -Rf subdir. Here, everything under subdir gets deleted, including the directory subdir itself. Good luck. E.- P.S. I love the find command :-) -- Eloy A. Paris Information Technology Department Rockwell Automation de Venezuela Telephone: +58-2-9432311 Fax: +58-2-9430323 -- TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word unsubscribe to [EMAIL PROTECTED] . Trouble? e-mail to [EMAIL PROTECTED]
Re: rm -r/-R/--recursive doesn't seem to work
On Tue, 31 Dec 1996, Dale Scheetz wrote: I just built a distribution tree from a CD on my hard disk. I tried to remove all the TRANS.TBL files from the tree by using: rm -r TRANS.TBL If I do this in a directory that has a TRANS.TBL it, and only it, gets removed. If I do this in an upper directory without a TRANS.TBL file, I get the error no such file or directory Am I doing something wrong, or is this a bug in rm? TIA, Dwarf Dale, I didn't think that was how the recursive remove was supposed to work. My understanding is that it is supposed to get everything (files, directories) under and including the specified file. That way, rm -R bad.dir would delete not only bad.dir, but if it is a directory, it would also get all of the contents of bad.dir. From your description, I think you want to do something like this: find . -name TRANS.TBL -exec rm {} \; Hope this helps. - Don - Don Prezioso Ashland University Phone: (419) 289-5015 System Programmer/Analyst 401 College Avenue E-mail: [EMAIL PROTECTED] Administrative Computing Ashland, OH 44805 http://www.ashland.edu/~dprez -- TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word unsubscribe to [EMAIL PROTECTED] . Trouble? e-mail to [EMAIL PROTECTED]
Re: rm -r/-R/--recursive doesn't seem to work
Them rm -R command does do what you want. I have used it to delete an entire ^^ subdirectory structure as in: rm -Rf subdir. Here, everything under subdir gets deleted, including the directory subdir itself. OOPPP!!! I really meant: the rm -Rf command DOES NOT do what you want Sorry for the mistake. Eloy.- -- Eloy A. Paris Information Technology Department Rockwell Automation de Venezuela Telephone: +58-2-9432311 Fax: +58-2-9430323 -- TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word unsubscribe to [EMAIL PROTECTED] . Trouble? e-mail to [EMAIL PROTECTED]
Re: rm -r/-R/--recursive doesn't seem to work
On Tue, 31 Dec 1996, Don Prezioso wrote: all of the contents of bad.dir. From your description, I think you want to do something like this: find . -name TRANS.TBL -exec rm {} \; Thanks to all who replied to my stupidity. This list is the greatest! I use rm -r all the time, for it's proper use, and should have known better than to expect it to work the way I did. The find line, of course, is the proper way to do this. I probably just need to be drinking something with more caffeine in it ;-) Thanks again to all, Dwarf -- aka Dale Scheetz Phone: 1 (904) 656-9769 Flexible Software 11000 McCrackin Road e-mail: [EMAIL PROTECTED] Tallahassee, FL 32308 If you don't see what you want, just ask -- -- TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word unsubscribe to [EMAIL PROTECTED] . Trouble? e-mail to [EMAIL PROTECTED]
Re: rm -r/-R/--recursive doesn't seem to work
Don Prezioso [EMAIL PROTECTED] writes: find . -name TRANS.TBL -exec rm {} \; find . -name TRANS.TBL -print0 | xargs -0 rm is better as it starts many fewer processes. Guy -- TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word unsubscribe to [EMAIL PROTECTED] . Trouble? e-mail to [EMAIL PROTECTED]