Live Chat!

svn command line tutorial for beginners 2

* * *     6 votos

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 svn repo?
This [...]

Posted in Developer, diff, mv, svn, vimdiff | Hits: 38661 | 7 Comments »

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

* * * *   1 votos

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 actually means current [...]

Posted in Common, mplayer, mv, rm | Hits: 12496 | 3 Comments »

Remove file start with special character

          0 votos

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 PostsHow to manipulate files with name like [...]

Posted in Common, mv, rm, touch | Hits: 10266 | 3 Comments »

Rename multiple files

* * * * ½ 7 votos

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
${variable%pattern} vs ${variable#pattern}
The funny-looking symbol, ${f%.txt} [...]

Posted in Common, Regular Expression, for, mv | Hits: 71230 | 14 Comments »