Skip to main content

All Questions

0 votes
3 answers
1k views

Script for copying files from a folder and appending md5sum into new filename

I would like to know if this is possible: I have a large number of .mov files in a folder. I would like to know if I can copy the files to a separate folder but include the md5sum in the new ...
neil's user avatar
  • 1
2 votes
3 answers
2k views

Copy filenames, and add path prefix, in a directory, recursively

I have a working directory: /home/myusername/projectdir The working directory contains files and sub-directories. The depth of sub-directories is not known. I want to put all the *.log files into the ...
BlackCat's user avatar
  • 405
7 votes
6 answers
40k views

How can I copy a file in a bash script and rename it while copying and place it in the same directory

How would I copy a file "file.doc" and rename it while copying to "file_copy.doc" and place it in the same directory ? And this only by calling the script and adding the file name in the argument: ...
redaction's user avatar
3 votes
3 answers
4k views

Copy files to a destination folder only if the files already exist. but the source files have a different file extension

Copy files to a destination folder only if the files already exist. but the source files have a different file extension. i.e I have a backup of some files with ".desktop.in" extension and I want to ...
Paul's user avatar
  • 321
3 votes
2 answers
3k views

find file, copy but with different name

I have files with random numbers in /home/user/files folder (every 4 days I have new ones). for example: john20 john25 john40 tom12 tom32 simon2 simon8 simon53 I want to take only last modified files ...
s1c's user avatar
  • 597
1 vote
2 answers
303 views

Copying and renaming files to a single directory by a single shell script

I have multiple files with an example of how they look like shown below. -rw-r--r-- 1 my_user users 12 Dec 13 09:56 Example_30_001_20130913175000.DAT -rw-r--r-- 1 my_user ...
CHT's user avatar
  • 13