Skip to content

Commit 9d43867

Browse files
os: update file system file and directory commands
1 parent aeaba82 commit 9d43867

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

docs/os/command-line/commands/file-system.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,18 +41,19 @@ Short-cuts:
4141

4242
`mkdir path/to/target_folder/new-folder-name` creates a new directory using a relative or full path, the current user has read, write, and execute files permissions in the new directory (`-m` flag or `chmod` to alter permissions)
4343

44+
`cp` copies files using the form cp file1 file2 [target_path], Use the `-R` flag to recursively copy a directory and its contents (including sub-directories)
4445

45-
`rm` command deletes files from a directory. You must have the write permission for the folder or use sudo. Here’s the syntax:
46+
`mv` moves (optionally rename) a file or directory to another location using the form mv file_or_directory [target_directory]
4647

47-
```shell
48-
rm [options] file1 file2
49-
```
48+
`rm` command deletes files from a directory. You must have the write permission for the folder or use sudo. Uses the form: rm [options] file1 file2
49+
50+
!!! INFO "Common flags for file and directory commands"
51+
`-r` (recursive) acts on a directory and its contents, including subdirectories.
5052

51-
-r (recursive) option removes a directory and its contents, including subdirectories.
53+
`-i` (interactive) flag prompts for confirmation before running the command
5254

53-
-i (interactive) flag prompts for confirmation before the removal
55+
`-f` (force) to run the command without confirmation
5456

55-
-f (force) to delete without confirmation
5657

5758
!!! INFO "Shell may be configured to ask for delete confirmation"
5859
<!--- TODO: add link to configure zsh and bash shells to always prompt for delete confirmation --->

0 commit comments

Comments
 (0)