Also take some time to learn more about how globbing
works. The shell will expand the wildcards in the given string into a list of matching filenames, if there are any, before
the command is run, as a list of arguments for it to process.
For that reason, you also don't need to use ls
, unless you want it's advanced file listing features. If you just want to print out a list of items, a simple built-in printf
will do just as well.
printf '%s\n' ../../dira/dir1/coffees/n*