Filename Rename
Published on 21 May 2020
- Filename rename
ls -d *.php3 | sed 's/\(.*\).php3$/mv "&" "\1.php"/' | sh
- Using
for
:
for x in `ls -d *.php3 | sed 's/.php3$//'`; do mv $x.php3 $x.php; done
for i in `ls -d *.sql | sed 's/^izvjestajac_//'`; do mv izvjestajac_$i $i; done
- Alternatives
mv `ls -l *.txt | cut -d ":" -f 2 | cut -d " " -f 2`
for f in *.txt; do mv "${f}" "${f/.txt/.nfo}"; done;
for f in /export/home/data/cdrsSS/SS/*.viejo; do mv "${f}" "${f/.viejo/}"; done;
all tags
IDE architecture" cli crontab crypto csv database docker editor error exceptions fastapi ffmpeg filename git go history http iteration javascript linux logging me mysql numpy orm pdo pentaho php postgres python random rename rsync rust selenium server solana sql sqlite ssh typescript user w3m wordpress