bash - Renaming files in linux terminal -
this question has answer here:
i have 2 files
2014-06-27 names.csv 2014-06-27 money.csv
i want rename files , them.
can rename command? how should it? there better way?
i can't use predefined length of characters chop off @ beginning automatically generated files may have different prefix scheme on later date. onething sure. end in " names.csv" , " money.csv"
edit: want rename them "names.csv" , "money.csv". sorry not providing info
you can use rename
command:
rename 's/^.* (.*\.csv)$/$1/' *.csv
Comments
Post a Comment