11, 14, 2020
linux terminal ls
Use ls
to list the contents inside a folder.
Typing
~my-project$ ls
will list the contents that are inside the my-project
directory.
Also , adding a folder name/path to ls lists the contents of the directory.
~$ ls/my-project
will list the contents of the my-project directory.
ls accepts alot more options.
To view hidden files, type
~my-project$ ls -a
on your terminal.You will see directories that start with a dot.Example .my-project
is a hidden file.
To get alot more information like file permissions ,file owner and file modified date, type
~my-project$ ls -l
on your terminal.
These arguments can also be combined.
Typing
~$ ls -al
on your terminal gives this information.
From left to right :