Ubuntu – How to list the files in other (non-current) directory

directoryls

If ls lists the content of the current directory, is there a similar command that list the content of a non current directory, without using cd?

Best Answer

After ls just type the path of the directory you want to list and you will get it. Imagine you are in your home directory but want to list /etc. Just run ls /etc and you will get it listed.