Manipulating files
Now that you have an understanding of how paths are represented in bash, it is time to learn how to manipulate them.
There are many commands that you can use to manipulate files in bash, which include the commands in the following table:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ls
ls
is perhaps the most common basic function, and is used regularly to see which files are present in the directory that you are in. This is done using the list (ls
) command. By default, this is the current folder that you are in. If you want to see the contents of another folder, simply append the path to the end of the ls
command.
Tip
ls
doesn't display any files or folders that begin with (.
). The reason for this is that any file or directories beginning with (.
) are hidden.
The ls
command has many different options that change the output on your screen. Some common ls
parameters...