apt-cache search name
apt-cache policy name
modinfo name
dpkg -l | grep name
puppet agent -t // Update puppet list in /etc/apt/sources.list.d/name.list
# 1. NVIDIA gpus
nvidia-smi
# 2. Display info
(sudo) lshw -C display
# 3. Device info
lspci -v -s $(lspci | grep ' VGA ' | cut -d" " -f 1)
rpm -qa
w
who
ps // Only yours
ps -e // Everyone's
// The filesystem.
df -h
// For any file or dir
du -sh *
// ex.pdf? ---> ex.pdf
for f in *.pdf?; do mv "$f" "${f%?}"; done
Now enter a space after "location" and drag the folder you created over to Terminal (which will insert the file path of the folder), or enter the location yourself.
defaults write com.apple.screencapture location
killall SystemUIServer
ls | wc -l
find . | wc -l
find . -type f | wc -l
// https://stackoverflow.com/a/16957078
grep -rnw '/path/to/somewhere/' -e 'pattern'
grep -rnw --exclude=\*.{html,js} "Welcome"
vim --cmd 'profile start profile.log' \
--cmd 'profile func *' \
--cmd 'profile file *' \
-c 'profdel func *'
-c 'profdel file *' \
-c 'qa!'
getent group group-name
getent passwd user-name