Computing.Net > Forums > Unix > remove files that has particular st

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

remove files that has particular st

Reply to Message Icon

Name: gpatel
Date: July 21, 2005 at 12:35:58 Pacific
OS: unix
CPU/Ram: 256
Comment:

hello,
i wanted to move those file that has a string like
" I am yello"
so any file that has this string i wanted to move that file somewhere else or remove that file. can someone help w/ easy script.
thanks a lot,
Gpatel



Sponsored Link
Ads by Google

Response Number 1
Name: Luke Chi
Date: July 22, 2005 at 11:26:06 Pacific
Reply:

1. move:

mv `grep -l "I am yello" *` $DESTINATION_DIR

2. remove:

rm `grep -l "I am yello" *`

Luke Chi


0
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Unix Forum Home


Sponsored links

Ads by Google


Results for: remove files that has particular st

Remove files command www.computing.net/answers/unix/remove-files-command/7948.html

removing files / match criteria www.computing.net/answers/unix/removing-files-match-criteria/7858.html

Removing first few charecters from www.computing.net/answers/unix/removing-first-few-charecters-from/4414.html