Archive for February, 2010

Copying all but today’s files

February 25th, 2010 No comments

I’d put some new files into a folder before remembering to mothball all the old files:-

Here is a zsh solution:-

>mv *.*(^m-1)   ./old

Categories: Uncategorized Tags:

zsh wonderful use of dirs,popd,pushp, cd ~5

February 20th, 2010 No comments

I’ve never got the hang of popd & pushd they seemed a bit pointless. zsh however has extended their abilities eg:-

> dirs -v    # number and list your recent directories one per line

> cd ~5     # cd to directory 5 in the directory stack

> cd -<tab>    # the tab complete lists the directory stack then type a digit to select the one you require (saves you having to do a dirs -v in the first place

I have to work in very complicated directory structures so this will be fantastically useful.

#don’t forget the zsh cd substitute command

> cd olddir newdir

eg you are in


> cd live test


Categories: shell tips Tags: