I would like to list all files in folder without one. I created this command ls /Users/MyName/Library/Safari | grep ! "Extensions"
. The problem is that the Terminal doesn't understand the not (!
). How to change that it works?
Thanks!
macosterminal
I would like to list all files in folder without one. I created this command ls /Users/MyName/Library/Safari | grep ! "Extensions"
. The problem is that the Terminal doesn't understand the not (!
). How to change that it works?
Thanks!
Best Answer
You might do it like this:
grep -v "Extensions"
excludes "Extensions" from the listing.