Ubuntu 16.04.1
I run Nagios on this server.
I have a directory that contains .cfg files
I would like to move those .cfg files to and archive directory
Tying to use the mv command and add a suffix to the end of the files.
#!/bin/sh
today=$(date +%Y-%m-%d)
mv -v -b --suffix=.'today'-TG *.cfg archive
Open in new window
root@tgcs017:/usr/local/na
gios/etc/o
bjects/des
ktops# ./update.sh
'TGKW001.cfg' -> 'archive/TGKW001.cfg'
'TGKW003.cfg' -> 'archive/TGKW003.cfg'
'TGKW004.cfg' -> 'archive/TGKW004.cfg'
'TGKW005.cfg' -> 'archive/TGKW005.cfg'
'TGKW006.cfg' -> 'archive/TGKW006.cfg'
'TGKW007-10.cfg' -> 'archive/TGKW007-10.cfg'
'TGKW008-10.cfg' -> 'archive/TGKW008-10.cfg'
'TGKW009.cfg' -> 'archive/TGKW009.cfg'
'TGKW012.cfg' -> 'archive/TGKW012.cfg'
the script is simple and it runs it moves the files but never adds the suffix.
Any ideas?
Thank you