I would like to list all files in folder without one. I created this command
ls /Users/MartinBengsch/Library/Safari | grep ! "Extensions". The problem is that the Terminal doesn't understand the not (
!). How to change that it works?
You might do it like this:
ls /path/to/folder | grep -v "Extensions"
grep -v "Extensions" excludes "Extensions" from the listing.
You can turn on extended glob in bash.
shopt -s extglob cd $HOME/Library/Safari ls -d -- !(Extentions)