First, ask ls for a long listing:
Command
ls -lPiece-by-piece explanation
lsis the list command.- The space separates the command from its option.
-lmeans long format.- The long format adds permissions, owner, size, date, and name.
Expected output
drwxr-xr-x 2 maya maya 4096 Jul 15 10:00 Documents
-rw-r--r-- 1 maya maya 120 Jul 15 10:02 notes.txtYour details differ. A line beginning with d represents a directory; a dash normally represents a regular file.
Now learn a separate option that includes hidden names:
Command
ls -aPiece-by-piece explanation
lsstill lists names.-ameans all.- It includes names beginning with a dot.
- The special entries
.and..also appear.
Expected output
. .. .bashrc Desktop DocumentsYour hidden names differ. The single dot means the current directory; two dots mean its parent.
Options can later be combined as -la, but practice each one separately first so its effect is clear.