ubuntu:bash:list_files_excluding_some_files
Differences
This shows you the differences between two versions of the page.
ubuntu:bash:list_files_excluding_some_files [2019/11/29 10:50] – created peter | ubuntu:bash:list_files_excluding_some_files [2019/12/07 01:41] (current) – removed peter | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Ubuntu - Bash - List files excluding some files ====== | ||
- | |||
- | Without enabled globbing files can be excluded by the second command of this code section: | ||
- | |||
- | <code bash> | ||
- | # See all files ending in .html | ||
- | ls | grep " | ||
- | # see all files not ending in .html | ||
- | ls | grep -v " | ||
- | </ | ||
- | |||
- | If extended globbing is turned on, one should be able to execute | ||
- | |||
- | <code bash> | ||
- | printf " | ||
- | </ | ||
- | |||
- | in ksh and bash but I wasn' | ||
- | |||
- | In zsh you enable globbing by inserting setopt extendedglob in .zshrc | ||
- | |||
- | In the zsh this should work | ||
- | |||
- | <code bash> | ||
- | ls path/ | ||
- | </ | ||
- | |||
- | but I get zsh: number expected. | ||
- | |||
- | Even though it's not working yet it's worth to add these commands to this list as the issue can be fixed by reading some more documentation like [[http:// | ||
ubuntu/bash/list_files_excluding_some_files.1575024617.txt.gz · Last modified: 2020/07/15 09:30 (external edit)