I have a report running in UNIX and creating a file named xxxx_ddmmyy_hhmm_zzzzzz.txt
. I need to remove the zzzzzz
from the file name.
How do I do it?
I have a report running in UNIX and creating a file named xxxx_ddmmyy_hhmm_zzzzzz.txt
. I need to remove the zzzzzz
from the file name.
How do I do it?
use mv
comand like this :
mv old-file-name new-file-name
in this case :
mv xxxx_ddmmyy_hhmm_zzzzzz.txt xxxx_ddmmyy_hhmm.txt.
To make mv interactive pass the -i option. This option will prompt before overwriting file:
mv -i file1 file2
Sample outputs: mv: overwrite 'file2'? y