I'm trying to do the following on OSX:
ls -lR --ignore *.app
So that I can recursively search through all folders except for .app folders.
However it seems there is seems to be no --ignore
or --hide
options in Darwin.
Perhaps a script to recursively search one folder deep for a given set and I'm not sure I cant pipe ls -lR
through anything because of the format of the output:
./ROOT/Applications/Some_app:
drwxr-xr-x 3 admin root 102 26 Jun 11:03 app-bundle.app #<- WANT THIS
drwxr-xr-x@ 24 admin root 816 26 Jun 11:24 folder #<- WANT THIS
./ROOT/Applications/Some_app/app-bundle.app: #<- DON'T WANT
drwxr-xr-x 7 admin root 238 26 Jun 11:03 Contents #<- DON'T WANT
...
While you're there—or when you're in any folder (directory in Unix-speak)—you might want to know what's in it. To do that you use the ls (or list) command. Type ls and press the Return key, and you'll see the folders (and/or files) in the current directory.
The ls command is used to list files. "ls" on its own lists all files in the current directory except for hidden files.
An alternative is to pipe to grep:
ls | grep -v
Use find
:
find . -ls -name '*.app' -prune
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With