I am trying to rename bulk files however i dont think the rename/mv command is giong to help me here. here is a quick snapshot of the files I need to rename:
75008040 -rw-r----- 1 root root 8716 May 8 05:00 10.9.144.2
75008041 -rw-r----- 1 root root 11700 May 8 05:00 10.9.160.2
75008042 -rw-r----- 1 root root 9019 May 8 05:00 10.9.16.2
75008043 -rw-r----- 1 root root 10011 May 8 05:00 10.9.176.2
I would like the files to look lik this when done:
75008040 -rw-r----- 1 root root 8716 May 8 05:00 10.9.144.2.txt
75008041 -rw-r----- 1 root root 11700 May 8 05:00 10.9.160.2.txt
75008042 -rw-r----- 1 root root 9019 May 8 05:00 10.9.16.2.txt
75008043 -rw-r----- 1 root root 10011 May 8 05:00 10.9.176.2.txt
I think the issues is that thre are many dots int he filename and mv/rename doest understand that. Not suree what I can do. My goal is to figure out he cmmand and run a cron job to do this daily as new files are writin. Thanks in advance for any suggestions.
My quesiton is not about cron... Im asking where to I type for i in 10.*; do mv "$i" "$i".txt;? I tried typing it at eh commoand line but that does not work.