Here are my access logs those I want to backup.
/var/log/httpd/access_log
/var/log/httpd/access_log.1
/var/log/httpd/access_log.2
/var/log/httpd/access_log.3
...
I want to copy all these files but with different name:
The following does work as expected, but is it possible to write a single command assuming there will be a lot of files to copy?
cp /var/log/httpd/access_log /home/shantanu/access_log.bak
cp /var/log/httpd/access_log.1 /home/shantanu/access_log.1.bak