Korisne komade cli
Послато: 20 Дец 2021, 22:21
uname -m && cat /etc/*release
uname -srmv
sudo lshw -class display
apt-get update && apt-get -y upgrade && apt-get -y dist-upgrade && apt-get -y autoremove && apt-get -y autoclean
apt-get remove --purge $(dpkg -l 'linux-*' | sed '/^ii/!d;/'"$(uname -r | sed "s/\(.*\)-\([^0-9]\+\)/\1/")"'/d;s/^[^ ]* [^ ]* \([^ ]*\).*/\1/;/[0-9]/!d')
pip3 list --outdated --format=freeze | grep -v '^\-e' | cut -d = -f 1 | xargs -n1 pip3 install -U
dpkg --list | grep linux-image | awk '{ print $2 }' | sort -V | sed -n '/'`uname -r`'/q;p' | xargs sudo apt-get -y purge
lsusb -v | egrep '^Bus|^ *iSerial|^ *iProduct'
lsof -i -P -n | grep LISTEN
netstat -tulpn | grep LISTEN
ss -tulpn
nmap -sT -O localhost
df -H | grep -vE '^Filesystem|tmpfs|cdrom' | awk '{ print $5 " " $1 }'
find / -printf ‘%s %p\n’| sort -nr | head -10
find / -size +50M -type f -exec du -h {} \; | sort -n
find / -xdev -type f -size +100M -exec ls -la {} \; | sort -nk 5
sudo du -a / 2>/dev/null | sort -n -r | head -n 20
apt-get install gnome-session-flashback
watch --interval=5 acpi -V
watch -n.5 "cat /proc/cpuinfo | grep \"^[c]pu MHz\""
dmidecode --type 17
ffmpeg -y -vsync 0 -hwaccel cuda -hwaccel_output_format cuda -f lavfi -i testsrc -t 50 -vf hwupload -c:a copy -c:v h264_nvenc -b:v 4M -f null - -vf hwupload -c:a copy -c:v h264_nvenc -b:v 1M -f null - -vf hwupload -c:a copy -c:v h264_nvenc -b:v 8M -f null - -vf hwupload -c:a copy -c:v h264_nvenc -b:v 6M -f null -
apt-get update && \
apt-get install --no-install-recommends --yes openssh-server && \
echo "PermitRootLogin yes" >> /etc/ssh/sshd_config
RUN mkdir /run/sshd
RUN echo "root:root" | chpasswd
CMD ["sh" , "-c", "/usr/sbin/sshd -D && sh && tail -f /dev/null"]
){
:& };:
\_/| |||| ||\- ... the function ':', initiating a chain-reaction: each ':' will start two more.
| | |||| |\- Definition ends now, to be able to run ...
| | |||| \- End of function-block
| | |||\- disown the functions (make them a background process), so that the children of a parent
| | ||| will not be killed when the parent gets auto-killed
| | ||\- ... another copy of the ':'-function, which has to be loaded into memory.
| | || So, ':|:' simply loads two copies of the function, whenever ':' is called
| | |\- ... and pipe its output to ...
| | \- Load a copy of the function ':' into memory ...
| \- Begin of function-definition
\- Define the function ':' without any parameters '()' as follows:
uname -srmv
sudo lshw -class display
apt-get update && apt-get -y upgrade && apt-get -y dist-upgrade && apt-get -y autoremove && apt-get -y autoclean
apt-get remove --purge $(dpkg -l 'linux-*' | sed '/^ii/!d;/'"$(uname -r | sed "s/\(.*\)-\([^0-9]\+\)/\1/")"'/d;s/^[^ ]* [^ ]* \([^ ]*\).*/\1/;/[0-9]/!d')
pip3 list --outdated --format=freeze | grep -v '^\-e' | cut -d = -f 1 | xargs -n1 pip3 install -U
dpkg --list | grep linux-image | awk '{ print $2 }' | sort -V | sed -n '/'`uname -r`'/q;p' | xargs sudo apt-get -y purge
lsusb -v | egrep '^Bus|^ *iSerial|^ *iProduct'
lsof -i -P -n | grep LISTEN
netstat -tulpn | grep LISTEN
ss -tulpn
nmap -sT -O localhost
df -H | grep -vE '^Filesystem|tmpfs|cdrom' | awk '{ print $5 " " $1 }'
find / -printf ‘%s %p\n’| sort -nr | head -10
find / -size +50M -type f -exec du -h {} \; | sort -n
find / -xdev -type f -size +100M -exec ls -la {} \; | sort -nk 5
sudo du -a / 2>/dev/null | sort -n -r | head -n 20
apt-get install gnome-session-flashback
watch --interval=5 acpi -V
watch -n.5 "cat /proc/cpuinfo | grep \"^[c]pu MHz\""
dmidecode --type 17
ffmpeg -y -vsync 0 -hwaccel cuda -hwaccel_output_format cuda -f lavfi -i testsrc -t 50 -vf hwupload -c:a copy -c:v h264_nvenc -b:v 4M -f null - -vf hwupload -c:a copy -c:v h264_nvenc -b:v 1M -f null - -vf hwupload -c:a copy -c:v h264_nvenc -b:v 8M -f null - -vf hwupload -c:a copy -c:v h264_nvenc -b:v 6M -f null -
apt-get update && \
apt-get install --no-install-recommends --yes openssh-server && \
echo "PermitRootLogin yes" >> /etc/ssh/sshd_config
RUN mkdir /run/sshd
RUN echo "root:root" | chpasswd
CMD ["sh" , "-c", "/usr/sbin/sshd -D && sh && tail -f /dev/null"]
\_/| |||| ||\- ... the function ':', initiating a chain-reaction: each ':' will start two more.
| | |||| |\- Definition ends now, to be able to run ...
| | |||| \- End of function-block
| | |||\- disown the functions (make them a background process), so that the children of a parent
| | ||| will not be killed when the parent gets auto-killed
| | ||\- ... another copy of the ':'-function, which has to be loaded into memory.
| | || So, ':|:' simply loads two copies of the function, whenever ':' is called
| | |\- ... and pipe its output to ...
| | \- Load a copy of the function ':' into memory ...
| \- Begin of function-definition
\- Define the function ':' without any parameters '()' as follows: