svn command line tutorial for beginners 2

April 17th, 2007 mysurface

This is the continues tutorial for svn command line tutorial for beginners 1. The previous post covers Introduction of subversion, installation links, how to get help, create svn repository, import files into a new repository and list the files inside a repo. svn command line tutorial for beginners continues …. How to checkout files from [...]

Posted in Developer, diff, mv, svn, vimdiff | Hits: 206731 | 16 Comments »

How to manipulate files with name like ‘-life.mp3′

March 21st, 2007 mysurface

Sometimes, you may find some file you can’t delete because of the filename begins with minus(-). LBE have that example on the post “Remove file start with special character”, as simple as this rm ./-life.mp3 The same way you can manipulate those files by mv, cp etc. The important highlights here is ./ dot(.) is [...]

Posted in Common, mplayer, mv, rm | Hits: 40375 | 4 Comments »

Remove file start with special character

December 5th, 2006 mysurface

In linux, file can be any name, including “–testing”. If you have a file with this name, how you delete it? Command line bellow will fail, rm –testing The correct one is rm ./–testing This works for mv, cp etc. So you can actually create a file with name “–testing” using touch. touch ./–testing Related [...]

Posted in Common, mv, rm, touch | Hits: 54928 | 9 Comments »

Rename multiple files

November 5th, 2006 toydi

Often over time, we will want to reorganize a group of files by renaming them. To rename *.txt to *.bak (e.g. to rename ham.txt to ham.bak) for f in *.txt; do mv “$f” “${f%.txt}.bak”; done To remove ‘new-’ from new-* (e.g. to rename new-ham.txt to ham.txt) for f in new-*; do mv “$f” “${f#new-}”; done [...]

Posted in Common, for, mv, Regular Expression | Hits: 185173 | 27 Comments »