Activity 3 - Explore Current Directory

Workshop Resources

How do you explore the directory?

To see the files in the current directory, we use the ls command. It means “List”.

Try it:

ls

ls command

How do I get more info about the files in this directory?

Try it:

ls -l
ls -l command

The -l flag in the above command tells ls to list long form information.

What information is being displayed?

Let’s examine the top line of the example above from left to right, for the directory Videos:

ls -l command explained

  1. green: the file permissions. The first character d denotes that Videos is a directory. If it were a - it would mean that Videos was a file.
  2. red: the number of links for this file. The directory Videos has 2 links.
  3. purple: the user who owns this file. User nuvi is the owner of Videos directory.
  4. white: the group this file belongs to. Here, the directory Videos belongs to nuvi group.
  5. yellow: the size of the file in bytes. The size for directory Videos is 4096 bytes.
  6. orange: date and time the file was created.
  7. blue: name of the directory.