The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM


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 !!

More UNIX and Linux Forum Topics You Might Find Helpful
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

Closed Thread
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 08-28-2003
Registered User
 

Join Date: Aug 2003
Posts: 3
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  
Old 08-29-2003
Perderabo's Avatar
Unix Daemon
 

Join Date: Aug 2001
Location: Washington DC Area
Posts: 8,667
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  
Old 09-05-2003
Kelam_Magnus's Avatar
Registered User
 

Join Date: Aug 2001
Location: DFW McKinney, TX,
Posts: 1,069
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  
Old 09-05-2003
Perderabo's Avatar
Unix Daemon
 

Join Date: Aug 2001
Location: Washington DC Area
Posts: 8,667
Actually $HOME is the user's home directory and is set automatically by the login program.
Google The UNIX and Linux Forums
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 08:27 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0