The UNIX and Linux Forums
>
Top Forums
>
Shell Programming and Scripting
coping files, need to exclude certain files
.
User Name
Remember Me?
Password
google unix.com
Forums
Register
Forum Rules
Links
Albums
FAQ
Members List
Calendar
Search
Today's Posts
Mark Forums Read
Thread
:
coping files, need to exclude certain files
View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
#
4
(
permalink
)
05-26-2009
panyam
Registered User
Join Date: Sep 2008
Posts: 474
Code:
find . ! -name "a.dat" ! -name "rem.txt" -name "*.dat" |xargs -i cp {} DEST
When i executed the above command , all files except a.dat file copied to the DEST folder. Although (a.dat fall under *.dat , find still excludes tht file).
In your case exclude all the 4 files , by putting their filenames in the commnad above and try.
panyam
View Public Profile
Find all posts by panyam
Find panyam's past nominations received
Find panyam's present nominations given