To copy multiple files to multiple-different names
for f in *.txt ; do cp -p "$f" " ${f/text/texttobereplaced"; done
To copy a single file to multiple files
for file in foo*.txt; do cp singlefile "$file" ; done
Note: Here, you have to create the files using touch.
To check the total size of a list of files in a directory
du -ch *.out | tail -n 1
To find all the instances of files with specific extension and delete all of them (recursively).
Before deleting, check all the files that will be deleted
find . -name "*.bak" -type f
Now, to if you are sure that these are the files to delete, run following command.
To check the total size of a list of files in a directory
du -ch *.out | tail -n 1
To find all the instances of files with specific extension and delete all of them (recursively).
Before deleting, check all the files that will be deleted
find . -name "*.bak" -type f
Now, to if you are sure that these are the files to delete, run following command.
find . -name "*.bak" -type f -delete