Bash Commands
Running Bash commands is quite easy. For example, you can verify the
location of the current folder simply by entering the command pwd
, which stands for print working
directory, to print out the full path of the current working
folder. Or you can see which files and subfolders are in the current
folder by entering ls
, which stands for
list contents. Table 7-2 details some of the more common
commands relating to files and folders (along with what they
do).
Note
Throughout this book I use the terms folder and directory interchangeably. Directory was the initial term for a folder in Unix, whereas folder is the term more commonly used on desktop systems such as Ubuntu, but they both refer to the same thing.
Table 7-2. File and folder commands
Command | Arguments | Action |
---|---|---|
|
| Display the contents of
|
|
| Change the working directory (or folder) to
|
|
| Change the file or folder
|
|
| Copy the file or folder
|
|
| Compare the contents of
|
|
| Display the string
|
|
| Search the filesystem for filenames matching the
string |
|
| Search the contents of the file or files supplied in
|
| List all files and folders in the current folder (except ... |
Get Ubuntu: Up and Running now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.