9月 04, 2019 Linux
### View system distribution
```sh
$ cat /etc/*release
```

### Check memory state
```sh
$ free -mh
```

## Check system state
```sh
$ top
```

### View file system
```sh
$ df -h
```

### List system running process
```sh
$ ps aux
```
filter by keyword
```sh
$ ps aux | grep 
```

### List system listening port
```sh
$ netstat -tlnp
```

### Extract .tar.gz file
```sh
$ tar zxvf 
```

### Compress a file / folder to .tar.gz
```sh
$ tar zcvf .tar.gz 
```
If you are using absolute path for target file path, all sub-folder and files will added to output file. To avoid this, you may use the `-C` option to indicate the start point.
```sh
$ tar zcvf .tar.gz -C /var/www /var/www/html
```
The output file root folder will be start from `html` folder.
過去文章
2025 (9)
4 (5)
3 (1)
2 (3)
2024 (25)
11 (3)
10 (3)
9 (1)
3 (18)
2022 (6)
10 (1)
6 (2)
5 (1)
3 (1)
1 (1)
2021 (21)
11 (7)
7 (1)
6 (2)
5 (2)
4 (6)
3 (2)
2 (1)
2020 (92)
12 (1)
11 (2)
10 (4)
9 (10)
8 (5)
7 (1)
6 (3)
5 (1)
4 (4)
3 (25)
2 (7)
1 (29)
2019 (57)
12 (25)
11 (7)
9 (25)