ls *
, the shell expands the wildcard * into a list of files and passes them as arguments to ls
.
sharfah@starship:~> ls * file1 File2Dot Globbing
By default, Bash does not glob dot-files. This means that
ls *
will not pick up any files beginning with the dot (.) character. However, it is easy to change this by doing the following:
sharfah@starship:~> shopt -s dotglob sharfah@starship:~> ls * .dotFile1 file1 File2Case-Insensitive Globbing
There is also an option to turn on case-insensitive globbing:
sharfah@starship:~> shopt -s nocaseglob sharfah@starship:~> ls f* file1 File2To view a list of all your shell options, type
shopt
.
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.