... | ... | @@ -45,6 +45,10 @@ To change the current working directory, use the command `cd` followed by a path |
|
|
/home/user/source
|
|
|
```
|
|
|
|
|
|
Copying and moving files and directories can be done using the `cp` and `mv` command. The syntax is similar between the two commands. The `cp` command is called with at least two arguments as in `cp source_path destination_path`. If you are trying to copy a directory, you need to use the `-R` flag. For example: `cp -R source_dir destination_dir`. The command `mv` does not require that flag when moving folders.
|
|
|
|
|
|
To delete a file or folder, use the `rm` command, using the syntax `rm target_path`. To delete a folder, use the `-r` flag, such as `rm -r target_dir`. Be very careful using this command, especially when executing with administrative privileges.
|
|
|
|
|
|
### Special Paths
|
|
|
There are a number of special paths that are available in the terminal. The path `~` is the user's home directory. The path `.` is the current working directory, while the path `..` is the directory that contains the current working directory. For example, if the working directory is `/home/user/`, the path `.` is equivalent to `/home/user/` and the path `..` is equivalent to `/home/`.
|
|
|
|
... | ... | |