I am trying to get a vertical list from ls, that is recursive but leaves a out a single directory called node_modules.I've used:ls -lt -h -RThis gets me a very long list that is vertical, human readable and recursive. But it has the directory node_modules included and that just has too many files and directories.
Leave directory out using ls
debian;ls
You can either use -I to ignore the directory as Stephane suggested or, better, avoid using ls altogether. Just use find which is far better for this kind of thing and can deal with strange file names gracefully:find . | grep -v node_modulesOr, for a safer approach that can deal with newlines in file names correctly:find . -not -regex .*node_modules.*or, for non-GNU find:find . ! -regex .*node_modules.*If you can have node_modules as part of a file name and don't want to skip that one, use this instead:find . -not -regex ./node_modules.*