Which of the following commands will help you find all the files in current directory?
The part of the operating system responsible for managing files and directories is called the file system. It organizes our data into files, which hold information, and directories (also called ‘folders’), which hold files or other directories. Several commands are frequently used to create, inspect, rename, and delete files and directories. To start exploring them, we’ll go to our open shell window. First, let’s find out where we are by running a command called Here, the computer’s response is
To understand what a ‘home directory’ is, let’s have a look at how the file system as a whole is organized. For the sake of this example, we’ll be illustrating the filesystem on our scientist Nelle’s computer. After this illustration, you’ll be learning commands to explore your own filesystem, which will be constructed in a similar way, but not be exactly identical. On Nelle’s computer, the filesystem looks like this: At the top is the root directory
that holds everything else. We refer to it using a slash character, Inside that directory are several other directories: We know that our current working directory
Underneath The user imhotep’s files are stored in Now let’s learn the command that will let us see the contents of our own filesystem. We can see what’s in our home directory by running
(Again, your results may be slightly different depending on your operating system and how you have customized your filesystem.)
Depending on your shell’s default settings, the shell might also use colors to indicate whether each entry is a file or directory.
Here, we can see that our home directory contains only sub-directories. Any names in our output that don’t have a classification symbol are plain old files.
Getting help
We’ll describe both ways next. The |