Skip to content

Commit 0fbf68d

Browse files
kcclemobobbyiliev
andauthored
Updated "uname" and "mkdir" commands. (bobbyiliev#266)
* Improved readability and corrected spelling. * Minor cleanup of the "head" command. * Updates to the "head", "tail", and "pwd" commands. * Updated the "touch" and "cal" commands. * Updates to the "df" command. * Updates to the "help" and "factor" commands. * Update 006-the-pwd-command.md * Updating "uname" and "mkdir" commands. Co-authored-by: Bobby Iliev <[email protected]>
1 parent ab600a7 commit 0fbf68d

File tree

2 files changed

+51
-39
lines changed

2 files changed

+51
-39
lines changed
+22-28
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,31 @@
11
# The `uname` command
2-
32
The `uname` command lets you print out system information and defaults to outputting the kernel name.
43

5-
### Examples
6-
7-
1. Print out all system information
8-
4+
## Syntax:
5+
```bash
6+
$ uname [OPTION]
97
```
10-
uname -a
11-
```
12-
13-
2. Print out the kernel version
148

9+
## Examples
10+
1. Print out all system information.
11+
```bash
12+
$ uname -a
1513
```
16-
uname -v
17-
```
18-
19-
### Syntax:
2014

15+
2. Print out the kernel version.
16+
```bash
17+
$ uname -v
2118
```
22-
uname [OPTION]
23-
```
24-
25-
### Additional Flags and their Functionalities
2619

27-
|**Short Flag** |**Long Flag** |**Description** |
28-
|:---|:---|:---|
29-
|`-a`|`--all`|print all information, except omit processor and hardware platform if unknown|
30-
|`-s`|`--kernel-name`|print the kernel name|
31-
|`-n`|`--nodename`|print the network node hostname|
32-
|`-r`|`--kernel-release`|print the kernel release|
33-
|`-v`|`--kernel-version`|print the kernel version|
34-
|`-m`|`--machine`|print the machine hardware name|
35-
|`-p`|`--processor`|print the processor type (non-portable)|
36-
|`-i`|`--hardware-platform`|print the hardware platform (non-portable)|
37-
|`-o`|`--operating-system`|print the operating system|
20+
## Options
21+
|**Short Flag**|**Long Flag**|**Description**|
22+
|:-|:-|:-|
23+
|`-a`|`--all`|Print all information, except omit processor and hardware platform if unknown.|
24+
|`-s`|`--kernel-name`|Print the kernel name.|
25+
|`-n`|`--nodename`|Print the network node hostname.|
26+
|`-r`|`--kernel-release`|Print the kernel release.|
27+
|`-v`|`--kernel-version`|Print the kernel version.|
28+
|`-m`|`--machine`|Print the machine hardware name.|
29+
|`-p`|`--processor`|Print the processor type (non-portable).|
30+
|`-i`|`--hardware-platform`|Print the hardware platform (non-portable).|
31+
|`-o`|`--operating-system`|Print the operating system.|
+29-11
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,44 @@
11
# The `mkdir` command
2-
32
The `mkdir` command in Linux/Unix is used to create a directory.
43

5-
For example:
64

7-
```
8-
mkdir name_of_directory
5+
## Syntax
6+
```bash
7+
$ mkdir [-m=mode] [-p] [-v] [-Z=context] directory [directory ...]
98
```
109

11-
If you want to create a subdirectory within a directory you can use the path to that directory.
12-
13-
For example:
10+
## Examples
11+
1. Make a directory named **myfiles**.
12+
```bash
13+
$ mkdir myfiles
14+
```
1415

16+
2. Create a directory named **myfiles** at the home directory:
17+
```bash
18+
$ mkdir ~/myfiles
1519
```
16-
mkdir /home/test
20+
21+
3. Create the **mydir** directory, and set its file mode (`-m`) so that all users (`a`) may read (`r`), write (`w`), and execute (`x`) it.
22+
```bash
23+
$ mkdir -m a=rwx mydir
1724
```
1825

1926
You can also create sub-directories of a directory. It will create the parent directory first, if it doesn't exist.
2027
If it already exists, then it move further to create the sub-directories without any error message.
2128

22-
For example:
29+
For directories, this means that any user on the system may view ("read"), and create/modify/delete ("write") files in the directory. Any user may also change to ("execute") the directory, for example with the `cd` command.
2330

31+
4. Create the directory **/home/test/src/python**. If any of the parent directories **/home**, **/home/test**, or **/home/test/src** do not already exist, they are automatically created.
32+
```bash
33+
$ mkdir -p /home/test/src/python
2434
```
25-
mkdir -p /home/test/src/python
26-
```
35+
36+
## Options
37+
|**Short Flags**|**Long Flags**|**Descriptions**|
38+
|:-|:-|:-|
39+
|`-m`|`--mode=MODE`|Set file mode (as in chmod), not `a=rwx - umask`.|
40+
|`-p`|`--parents`|No error if existing, make parent directories as needed.|
41+
|`-v`|`--verbose`|Print a message for each created directory.|
42+
|`-Z`|`--context=CTX`|Set the SELinux security context of each created directory to CTX.|
43+
|<center>-</center>|`--help`|Display a help message and exit.|
44+
|<center>-</center>|`--version`|Output version information and exit.|

0 commit comments

Comments
 (0)