Copy a list files from a directory towards another

General Linux items
User avatar
daniel
Site Admin
Posts: 219
Joined: Tue Jan 09, 2007 9:54 pm
Contact:

Copy a list files from a directory towards another

Postby daniel » Mon Jan 14, 2013 7:54 am

Hereby a simple command to copy a list of files (retrieved by ls) towards another directory:

Code: Select all

for file in `find . -name "*.jpg"`;
  do echo "$file";
  cp "$file" . ;
done



8)

Return to “General”

Who is online

Users browsing this forum: No registered users and 0 guests