Last active
January 23, 2023 14:11
-
-
Save neogeogre/14cc33443d182a1b1494e583acaabf94 to your computer and use it in GitHub Desktop.
linux commands
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo chown -R $(id -u):$(id -g) ~/Desktop/ | |
sudo chown -R $USER:$USER . | |
sudo chmod a+rwx myFile.sh | |
# 10 biggest files | |
du -a -h /path | sort -h -r | head -n 10 | |
ls -1Rhs | sed -e "s/^ *//" | grep "^[0-9]" | sort -hr | head -n20 | |
# See which PID/service is using a certain IP and port: | |
sudo netstat -nlpt |grep 3306 | |
# then stop it: | |
sudo service mysql stop | |
# disk space | |
df -h . | |
lsblk | |
# Se a certificate | |
dig -t NS google.com | |
# certificate to import in aws certificate manager as PEM | |
openssl rsa -in key.txt -outform PEM -out PrivateKey.pem | |
openssl x509 -in STAR.my-company.com.crt -out my-company.com.pem -outform PEM | |
openssl pkcs7 -in STAR.my-company.com.p7b -print_certs -out certificateBundle.pem | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment