Pipe grep to copy files based on name.
I just finished restoring some files from a friend's hard disk. All files are now into a folder and I need to transfer some of them.
While it's easy to copy files with a certain extension, I cannot understand how I can copy them using the filenames.
To select files to copy based on the extension, I just use cp *.(extension) /destination/folder/.
To list items based in name, I used
ls | grep name\ to\ search
cp | grep name\ to\ search
How do I pipe grep to cp to transfer files based on name?
|Thread||Thread Starter||Forum||Replies||Last Post|
|Cannot copy large files to Flash Drive||sharris||FreeBSD General||6||30th July 2010 09:57 AM|
|Copy w/ active verification||Weaseal||FreeBSD General||4||4th February 2009 11:23 PM|
|How to copy FBSD installation from one which is already installed on a HDD?||padmanabh||FreeBSD Installation and Upgrading||2||7th October 2008 04:09 AM|
|how to copy a directory.||bsdnewbie999||OpenBSD General||1||12th July 2008 02:36 PM|
|fstat | grep internet | grep -v -e '>' -e '<'||mfaridi||OpenBSD General||4||10th June 2008 09:58 PM|