find specific files and copy them to a directory in linux
Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
abc-1.0.zip
kncb-1.0.zip
jenk-1.1.zip
I want to find all the above files dynamically and copy them to a directory except jenk-1.1.zip. I have tried the below command but it also copies file(jenk*.zip), need a command which copies all the above files except jenk-1.1.zip to a directory mentioned (test_dir);
find . ( -name *abc*.zip-o -name *knc*.zip ! -name "*jenk*.zip") ! -path '*/test_dir/*.jar' -exec cp -ar ./test_dir ;
linux regular-expression
add a comment |Â
up vote
0
down vote
favorite
abc-1.0.zip
kncb-1.0.zip
jenk-1.1.zip
I want to find all the above files dynamically and copy them to a directory except jenk-1.1.zip. I have tried the below command but it also copies file(jenk*.zip), need a command which copies all the above files except jenk-1.1.zip to a directory mentioned (test_dir);
find . ( -name *abc*.zip-o -name *knc*.zip ! -name "*jenk*.zip") ! -path '*/test_dir/*.jar' -exec cp -ar ./test_dir ;
linux regular-expression
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
abc-1.0.zip
kncb-1.0.zip
jenk-1.1.zip
I want to find all the above files dynamically and copy them to a directory except jenk-1.1.zip. I have tried the below command but it also copies file(jenk*.zip), need a command which copies all the above files except jenk-1.1.zip to a directory mentioned (test_dir);
find . ( -name *abc*.zip-o -name *knc*.zip ! -name "*jenk*.zip") ! -path '*/test_dir/*.jar' -exec cp -ar ./test_dir ;
linux regular-expression
abc-1.0.zip
kncb-1.0.zip
jenk-1.1.zip
I want to find all the above files dynamically and copy them to a directory except jenk-1.1.zip. I have tried the below command but it also copies file(jenk*.zip), need a command which copies all the above files except jenk-1.1.zip to a directory mentioned (test_dir);
find . ( -name *abc*.zip-o -name *knc*.zip ! -name "*jenk*.zip") ! -path '*/test_dir/*.jar' -exec cp -ar ./test_dir ;
linux regular-expression
linux regular-expression
asked 8 mins ago
itgeek
151
151
add a comment |Â
add a comment |Â
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f475652%2ffind-specific-files-and-copy-them-to-a-directory-in-linux%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password