Today I Learned

hashrocket A Hashrocket project

Everything but the glob in zsh

If I want to delete everything in a directory except a specific file I can use the ^ as a negative glob.

> ls fruits
banana
apple
apricot
> ls fruits/^banana
apple
apricot

Or if I wanted to list everything that does not begin with a I can expand the glob.

> ls fruits/^a*
banana
See More #command-line TILs