![]() |
|
|
|
|
|||||||
| 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 |
| Using cp -r command to selectively omit *.dat files while copying a directory. | d_sai_kumar | UNIX for Dummies Questions & Answers | 5 | 07-18-2008 03:48 AM |
| Change All File Names in a Directory | andou | UNIX for Dummies Questions & Answers | 8 | 01-22-2008 06:06 PM |
| Command to list directory names only | stevefox | UNIX for Dummies Questions & Answers | 6 | 11-29-2007 05:06 PM |
| copying a file from one directory to another | soujanya_srk | UNIX for Dummies Questions & Answers | 5 | 11-02-2007 02:40 AM |
| File and Directory Names become hidden | dbinsol1 | UNIX for Advanced & Expert Users | 10 | 05-29-2002 06:58 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
When I do the following :
grep -l "string" *, I get a list of file names returned. Is there a way to copy the files returned from the list into another directory ?. Thanks. Last edited by Kartheg; 11-17-2005 at 08:54 AM. |
| Forum Sponsor | ||
|
|
|
#2
|
|||
|
|||
|
$ cp `grep -l "string" *` tmp/
|
|
#3
|
|||
|
|||
|
I get the following :-
cp:cannot access grep -l string * |
|
#4
|
|||
|
|||
|
Make sure you are using backticks (above the tab key on a standard keyboard).
|
|
#5
|
|||
|
|||
|
Yes, That works !
Thank you ashterix & dangral for your help. |
|||
| Google The UNIX and Linux Forums |