Line At A Time
Level 4: A Closer Look
A Closer Look Ask ls for the long version, with sizes and dates.

The little word after a dash is called a flag (or an option): an extra instruction that changes how a command behaves. Flags always come after the command name.

The -l flag means "long": one item per line, with extra details. Read each line from the right and it makes sense: the name, when it last changed, its size in bytes, and who owns it.

The very first character is the giveaway. d means directory (a folder); - means an ordinary file. So the two 4096-byte entries with a d are your folders, and pets.txt really is 15 bytes long: cat, dog and rabbit, one per line.

Try ls -a too. Any name beginning with a dot is hidden from a normal ls, and that is the whole trick: there is no secret setting, a dot at the front is all it takes. Programs use dot-names for their settings files so they do not clutter your folder up.

ls -lLong listing: permissions, size, date, name.
ls -aAll: includes the hidden dot-files.
ls -laBoth at once; flags can be joined together.
Your task
  • Get the long listing with ls -l
  • Reveal the hidden files with ls -a

Open this level in your browser to type the commands at a live terminal that answers back.