-
-
Save Drewster727/dda11c93539356287e0b487d0f21d375 to your computer and use it in GitHub Desktop.
This file contains 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
// show disk usage | |
du -h * | sort -h | |
du -h --max-depth=1 . | sort -h -r | |
tree -L 3 --du -h -D | |
// show deleted files | |
lsof | grep deleted | |
// show drive info | |
lsblk | |
lsblk -o +UUID | |
// show processes | |
ps aux | grep processname | |
htop | |
// su as particular user | |
sudo su username | |
// daemons/services | |
sudo service postgresql start | |
systemctl status postgresql.service | |
pg_ctl -D /usr/local/var/postgres start/stop | |
// start long running processes | |
nohup ./backup_fetch.sh > backup.log & | |
// Formatting new drives on new AWS ubuntu instance: | |
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-using-volumes.html | |
// formatting new drives | |
sudo mkfs -t xfs /dev/xvdf | |
sudo mkdir /data | |
sudo mount /dev/xvdf /data | |
// automatic mount on reboot with fstab | |
sudo vim /etc/fstab | |
UUID=f4b551ad-949b-4f3a-8755-ac7f8f3f3d32 /data xfs defaults,nofail 0 2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment