Category Archives: Linux

svn 常用命令

  1. 查看某次提交的文件:
    svn log --verbose -r 42
  2. 退回到历史版本:
    
    svn update
    svn merge -r 150:140 .
    svn commit -m "Rolled back to r140"
    
    
  3. revert changes to a file or directory
    
    svn revert foo.c
    svn revert --recursive .
    
    
  4. force add ignored file:
    
    svn add "file" --no-ignore
    svn status --no-ignore
    
    
  5. 比较某个文件的两次提交
    
    svn diff -r 8979:11390 path/to/file
    
    

批量重命名 文件名

批量重命名 文件名大小变小写

for f in * ; do mv -v $f `echo $f | tr '[A-Z]' '[a-z]'`; done

or

for f in `find . -name '*.rar'` ; do mv -v $f `echo $f | tr '[A-Z]' '[a-z]'`; done

文件自定义批量重命名:

for f in `find . -name '*.rar'` ; do mv -v $f `echo $f | sed 's/a/b/g'` done;