Wednesday, December 17, 2008

Quicker cp/mv

Quick way to copy or move a file with less typing:


$ cp test{,.bak}
$ ls
test test.bak


will expand the first non existent parameter (note just the comma in the curly brackets) as the file name test making a copy named test.bak.

Very useful as it allowes you to type less since you have to supply only one argument plus the new file's extension.

No comments: