3EXPLORING THE SYSTEM

image

Now that we know how to move around the file system, it’s time for a guided tour of our Linux system. Before we start, however, we’re going to learn some more commands that will be useful along the way.

ls List directory contents

file Determine file type

less View file contents

More Fun with ls

The ls command is probably the most used command, and for good reason. With it, we can see directory contents and determine a variety of important file and directory attributes. As we have seen, we can simply enter ls to get a list of files and subdirectories contained in the current working directory.

[me@linuxbox ~]$ lsDesktop  Documents  Music  Pictures  Public  Templates  Videos ...

Get The Linux Command Line, 2nd Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.