Linux批量改文件后缀:修订间差异

来自三线的随记
(创建页面,内容为“command: rename 似乎在不同发行版OS 参数不同 <br /> === Centos === rename .repo .repo.bak rename -v .repo .repo.bak rename -nv .repo .repo.bak ===…”)
 
无编辑摘要
 
第3行: 第3行:
似乎在不同发行版OS 参数不同
似乎在不同发行版OS 参数不同


=== Centos 7.5.1804 (Core) ===
[root@router yum.repos.d]# rename -V
rename from util-linux 2.23.2
[root@router yum.repos.d]# rename -h
Usage:
  rename [options] expression replacement file...
Options:
  -v, --verbose    explain what is being done
  -s, --symlink    act on symlink target
  -h, --help    display this help and exit
  -V, --version  output version information and exit
For more details see rename(1).
rename repo repo.bak ./*
<br />
<br />
 
===Centos ?===
=== Centos ===
  rename .repo .repo.bak
  rename .repo .repo.bak
  rename -v .repo .repo.bak
  rename -v .repo .repo.bak
  rename -nv .repo .repo.bak
  rename -nv .repo .repo.bak


=== Ubuntu [待验证] ===
===Ubuntu [待验证]===
  rename 's//.c//.h/'  ./*
  rename 's//.c//.h/'  ./*
 
 
[[分类:Linux]]
[[分类:Linux]]

2020年6月13日 (六) 18:59的最新版本

command: rename

似乎在不同发行版OS 参数不同

Centos 7.5.1804 (Core)

[root@router yum.repos.d]# rename -V
rename from util-linux 2.23.2
[root@router yum.repos.d]# rename -h

Usage:
 rename [options] expression replacement file...

Options:
 -v, --verbose    explain what is being done
 -s, --symlink    act on symlink target

 -h, --help     display this help and exit
 -V, --version  output version information and exit

For more details see rename(1).
rename repo repo.bak ./*


Centos ?

rename .repo .repo.bak
rename -v .repo .repo.bak
rename -nv .repo .repo.bak

Ubuntu [待验证]

rename 's//.c//.h/'  ./*