adding info in basic_cmd

This commit is contained in:
vl4dd 2021-04-08 07:47:24 -04:00
parent ea02763a32
commit d5a4cd2bd4
1 changed files with 8 additions and 11 deletions

View File

@ -43,7 +43,7 @@ Note: We can use an absolute path from any location where as if you want to use
``` ```
## Wildcard ## Wildcard
### \* Show all picture (multiple char) ### \* show all picture (multiple char)
```bash ```bash
$ ls pic* $ ls pic*
``` ```
@ -51,7 +51,7 @@ Note: We can use an absolute path from any location where as if you want to use
```bash ```bash
$ ls pic5?.jpg $ ls pic5?.jpg
``` ```
[] show only if char in [p-P] ### [] show only if char in [p-P]
```bash ```bash
$ ls [pP]ic* $ ls [pP]ic*
``` ```
@ -79,7 +79,6 @@ back to previous folder
### Mkdir: Make directory ### Mkdir: Make directory
```bash ```bash
$ mkdir test1 test2 test3 $ mkdir test1 test2 test3
$ mkdir -p lol/lol/lol $ mkdir -p lol/lol/lol
``` ```
-p to create parent directory if needed -p to create parent directory if needed
@ -87,7 +86,6 @@ back to previous folder
### Rmdir: Remove directory ### Rmdir: Remove directory
```bash ```bash
$ rmdir filename $ rmdir filename
$ rm -rf filename $ rm -rf filename
``` ```
@ -114,7 +112,6 @@ Remove all files with the .doc extension recursively in the current working dire
### Touch: change file timestamps but it can also create files ### Touch: change file timestamps but it can also create files
```bash ```bash
$ touch nomdefichier.md $ touch nomdefichier.md
$ touch pic{00..99}.jpeg # does not work $ touch pic{00..99}.jpeg # does not work
``` ```
@ -223,7 +220,7 @@ total 4
``` ```
##Using chmod in absolute mode ## Using chmod in absolute mode
In the absolute mode, permissions are represented in numeric form (octal system to be precise). In this system, each file permission is represented by a number. In the absolute mode, permissions are represented in numeric form (octal system to be precise). In this system, each file permission is represented by a number.
@ -289,7 +286,7 @@ marie steve
## Sysadmin tools ## Sysadmin tools
ss### Who: ### Who:
```bash ```bash
student@debianserver:/var/log$ who student@debianserver:/var/log$ who
waldek tty1 2021-04-08 11:06 waldek tty1 2021-04-08 11:06
@ -383,6 +380,7 @@ steve:x:1002:1002:,,,:/home/steve:/bin/fish
``` ```
## how to navigate in a web page source code
### Pipe | : pipe send result of the first command to the second ### Pipe | : pipe send result of the first command to the second
```bash ```bash
$ cat /etc/passwd **|** **grep** bash |**cut** -d ":" -f1 $ cat /etc/passwd **|** **grep** bash |**cut** -d ":" -f1
@ -410,6 +408,7 @@ Or, to search the current directory and all subdirectories, omit the path at the
### Wc: print newline, word, and byte counts for each file ### Wc: print newline, word, and byte counts for each file
```bash ```bash
$ wc -l $ wc -l
```
### Realpath ### Realpath
@ -418,8 +417,6 @@ $ realpath example.txt
/home/username/example.txt /home/username/example.txt
``` ```
## how to navigate in a web page source code
### Wget: The non-interactive network downloader ### Wget: The non-interactive network downloader
```bash ```bash
@ -433,7 +430,7 @@ $ cat index.html | grep -o "https.*" |cut -d "\"" -f1 |sort | uniq
``` ```
## text editor ## text editor
- Nano: Nano's ANOther editor, an enhanced free Pico clone ### Nano: Nano's ANOther editor, an enhanced free Pico clone
(simple text editor for noobies) (simple text editor for noobies)
```bash ```bash