Book Image

Learning Raspbian

By : William Harrington
Book Image

Learning Raspbian

By: William Harrington

Overview of this book

Table of Contents (15 chapters)
Learning Raspbian
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

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

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...