On 11/30/2015 03:50 PM, Robert Moskowitz wrote:
Now I want to rename these files, which are all lectures to have the
date of creation/lastmodified in the file name.
Does the date require a specific format?
You could:
mv "$file" "$file-$(stat -c %y "$file")"
Or if you want to define your own (and assuming no file names contain
quote characters):
find $files -type f -printf 'mv "%p" "%p-%TY%Tm%Td"\n' | sh