export SETUPTOOLS_ENABLE_FEATURES=legacy-editable
lscpu
cat /etc/*-release
$ sudo -s
$ ssh-keygen
$ vi ~/.ssh/authorized_keys
upload id_rsa.pub
$ ssh user@IP
lsof -i -P -n | grep LISTEN
kill $(lsof -t -i:8055)
simple password encrypt (example abc)
echo abc | openssl aes-256-cbc -a -salt -pass pass:somepassword -pbkdf2
echo U2FsdGVkX1+W+KyjQ/FywzWm2EXFDe1GnT1MXweYuoU= | openssl aes-256-cbc -d -a -pass pass:somepassword -pbkdf2
simple password encrypt (example abc)
echo abc | mkpasswd -m sha-512
$ sudo apt install vim --yes
$ apt-get install vim -y
$ sudo apt-get update
$ sudo apt-get upgrade
$ env
$ printenv
export BLOB2_KEY=aaa
unset BLOB2_KEY
$ nprocs
$ lscpu
$ free -mh
$ df -h
curl -s https://checkip.amazonaws.com
du -sh file.zarr
for f in *.zarr; do rm -rf "$f"; done
CTRL + ALT + t
tar -xvf archive.tar.gz
gzip -c original_file > compressed_copy.gz
tar -czf FOLDER.tar.gz FOLDER
echo "a" > file.csv && echo "1" >> file.csv
date +"%Y-%m-%dT%H:%M:%S"
date +"%Y-%m-%dT%H:%M:%S%z"
CTRL + ALT + DOWN
ps -ef
pkill -u USERNAME
...
https://askubuntu.com/questions/1033785/external-monitor-not-detected-on-ubuntu-18-04
https://linuxconfig.org/how-to-install-the-nvidia-drivers-on-ubuntu-18-04-bionic-beaver-linux
$ ubuntu-drivers devices
$ sudo ubuntu-drivers autoinstall
https://www.nvidia.com/en-us/geforce/drivers/
sudo apt-get purge 'nvidia*'
sudo add-apt-repository ppa:graphics-drivers
sudo apt-get update
sudo ubuntu-drivers autoinstall
example.sh:
#!/usr/bin/bash
year=2018
echo ${year}
delete folders in a folder in a loop
for f in *; do rm -rf $f; done
Size of folder
For loop
for year in {2003..2018}; do
month_list=(01 02 03 04 05 06 07 08 09 10 11 12)
periods_list=(31 29 31 30 31 30 31 31 30 31 30 31)
i=0
for month in ${month_list[@]}; do
periods=${periods_list[$i]}
i=$(expr $i + 1)
done
simple password encrypt (example abc)
echo abc | openssl aes-256-cbc -a -salt -pass pass:somepassword -pbkdf2
echo U2FsdGVkX1+W+KyjQ/FywzWm2EXFDe1GnT1MXweYuoU= | openssl aes-256-cbc -d -a -pass pass:somepassword -pbkdf2
at now +1 minute
echo hello
Ctrl-D
echo echo hello world | at now
echo "command_to_be_run" | at now +1 minute
at 09:00 <<EOF
command_to_be_run
EOF
at -l | awk '{printf "%s ", $1}' | xargs atrm
convert -delay 50 -loop 1 *.png animation.gif
Replace a with b in file.txt
find file.txt -type f -exec sed -i "" "s/a/b/g" {} \;
Replace , "a"] with ] in file txt
find file.txt -type f -exec sed -i "" 's/, "a"]/]/g' {} \;