> For the complete documentation index, see [llms.txt](https://docs.aic-eec.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.aic-eec.com/computer-operation-systems/zero-to-linux-hero/anatomy-of-linux-system/linux-os-command-line-part-i/hacker-commands.md).

# Hacker Commands

### รู้จักไฟล์/ไดเรกทอรี ซ่อนไฟล์

```shell-session
$ file /etc/lsb-release

$ file /dev/tty0 

$ file /usr/bin/head

$ file /usr/bin/netcat

$ which netcat

$ which head

$ touch .my_hidden_file

$ ls -a | grep "^\."
```

### Special files

```shell-session
/dev/null
Discards all the data written to it. Useful to trash out unwanted output (usually some unnecessary log information).

/dev/zero
Reading this file return zero. Useful to fill a file with all zeros.

/dev/random
Returns random bytes when read. Use your imagination where this could come handy (cryptography, maybe).

/dev/urandom
Returns pseudo random number when read.
```

### Random Number Generator

```shell-session
$ od -vAn -N1 -tx1 -tu1 < /dev/urandom # N1 —> 1 byte, tx1 —> hex each 1 byte, tu1 —> dec each 1 byte

$ sudo < /dev/urandom tr -dc A-Za-z0-9 | head -c14; echo # จะลบทุกอักขระที่ไม่ใช่ A-Za-z0-9 ออกจากข้อมูลที่รับมา แล้วเอาแค่ 14 ตัวอักขระ
```
