Initial
This commit is contained in:
54
docs/linux/common.md
Normal file
54
docs/linux/common.md
Normal file
@@ -0,0 +1,54 @@
|
||||
|
||||
[File systems](filesystems.md)
|
||||
|
||||
[Fedora / CentOS](fedora.md)
|
||||
|
||||
[SELinux](selinux.md)
|
||||
|
||||
# Common
|
||||
|
||||
## find
|
||||
```
|
||||
find /var -maxdepth 2 -type d -printf "%TY-%Tm-%Td %TH:%TM:%TS %Tz %p\n"
|
||||
```
|
||||
|
||||
## bash
|
||||
```
|
||||
# cat > /etc/profile.d/cmp.sh
|
||||
|
||||
export EDITOR=mcedit
|
||||
export HISTFILESIZE=10485760
|
||||
export HISTSIZE=500000
|
||||
export HISTCONTROL=ignoreboth:erasedups
|
||||
export HISTIGNORE="history:reboot:poweroff:cd:ls:pwd:mc:ps:m:e:l"
|
||||
export SSH_ASKPASS=
|
||||
|
||||
alias ffi='ffmpeg -hide_banner -i'
|
||||
|
||||
alias m='cd /mnt'
|
||||
alias e='cd /etc'
|
||||
alias l='cd /var/log'
|
||||
|
||||
tabs -4
|
||||
|
||||
```
|
||||
|
||||
## reboot
|
||||
```bash
|
||||
echo 1 > /proc/sys/kernel/sysrq
|
||||
echo b > /proc/sysrq-trigger
|
||||
```
|
||||
|
||||
## Motherboard name
|
||||
```bash
|
||||
cat /sys/devices/virtual/dmi/id/board_name
|
||||
```
|
||||
|
||||
## grab video from screen
|
||||
```bash
|
||||
ffmpeg -s 1920x1080 -framerate 10 -f x11grab -i :0 -qscale 6 out.mkv
|
||||
```
|
||||
|
||||
```bash
|
||||
ps --ppid 2 -p 2 --deselect
|
||||
```
|
Reference in New Issue
Block a user