![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to remove user from a group using command line | civic2005 | SUN Solaris | 2 | 09-18-2008 11:05 AM |
| rm command not able to remove file | jambesh | Shell Programming and Scripting | 7 | 12-21-2007 04:37 AM |
| question on find and remove command | arunkumar_mca | UNIX for Dummies Questions & Answers | 1 | 12-10-2007 10:54 PM |
| sh, ksh: command to remove front spaces from a string? | pseudocoder | Shell Programming and Scripting | 3 | 09-22-2007 04:57 AM |
| command to remove last record on file | mheinen | UNIX for Dummies Questions & Answers | 4 | 01-09-2007 01:39 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
search and remove command
I want to run the 'locate' command and then remove what the command finds.
My guess was, locate blahblah |rm -f but this does not work. Thanks!
__________________
JasonR |
| Forum Sponsor | ||
|
|
|
#2
|
||||
|
||||
|
Can you be a bit more specific? What exactly do you want to remove? What is this "locate" command?
The fact that used "rm -f" suggests that you are possibly trying to delete files. I'm not really sure of that, but here is an example of what I suspect may be what you're trying to do: find $HOME -name core -print | xargs rm |
|
#3
|
||||
|
||||
|
Hey Per...
make sure he knows that $HOME is a variable he sets for the search directory and "core" is a filename you are looking for... Just trying to keep it clear as mud hehe....
__________________
My brain is your brain |
|
#4
|
||||
|
||||
|
Actually $HOME is the user's home directory and is set automatically by the login program.
|
||||
| Google The UNIX and Linux Forums |