Note: After asking this question, I found that the file browser Thunar, which comes with Xubuntu and is installable in any Ubuntu version, provides a bulk-renaming utility that works well for me.
I am trying to append timestamp hashes to files in directory or a userFileCode like a file password (for example all files of user have a prefix or suffix).
My problem is the mv
command only works once so I cannot use wildcards like so
mv *.* *.*_dateHashsuffix
error says it's not a directory.
Seems like mv
cannot handle multiple renames or do I have to use it like in cd /usr/bin && sudo mv test test_disabled && mv sudo sudo_disabled
... in other words perhaps I have to pipe the ls > filelist.tst
and then parse (do I use |grep
here?) that separately in a .sh
file script with executable permission run as so ./myscriptsname.sh
or cant I use ls >
directly in the script?
I see a use for this on my servers in the future to rename variables and files to prevent hacking. But a better idea altogether might be torrentDNS and zipSites in perhaps voxel based web browser with links to webpage content.
ls
at all times – Zanna Oct 20 '18 at 17:19_dateHashsuffix
constant for all files in one run or should it differ for each file? What are your actual needs? Doingcd /usr/bin && sudo mv <bulk_of_files>
looks like playing with fire. – Melebius Oct 22 '18 at 07:53