Hardware Reference
In-Depth Information
There are several special paths that you should know of in bash, as follows:
Path
Description
/
This is the root of the Linux filesystem and the highest path that you can have.
./
This represents the directory that you are currently in.
../
This is the directory one level below the one you are in.
~
This represents your home directory. When you are logged in as the Pi user,
this will be /home/pi . If you are running a command as the root, this will be /
root .
If you don't have a keyboard with the ~ key, you can press F12 instead.
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
cd
pwd
cat
head and tail
cp
mv
rm
mkdir
touch
adduser
addgroup
passwd
chmod
chown
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.
The contents of the home directory
 
Search WWH ::




Custom Search