This is a gist where I save useful unix commands as I come across them.
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
#To check which programs are running on which ports | |
sudo lsof -i :80 # checks port 80 | |
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME | |
haproxy 32850 root 4u IPv4 0xf27d639a63f41339 0t0 TCP *:http (LISTEN) | |
#To watch changes to a given folder | |
#To install this command on mac check out this link: http://osxdaily.com/2010/08/22/install-watch-command-on-os-x | |
watch -d ls -l | |
#Displays the file system disk space usage | |
df -k | |
uname -a | |
Darwin adil.local 13.1.0 Darwin Kernel Version 13.1.0: Thu Jan 16 19:40:37 PST 2014; root:xnu-2422.90.20~2/RELEASE_X86_64 x86_64 | |
#find filenames quickly | |
locate crontab | |
#changing the ulimit and starting mongo in the background | |
ulimit -n 2048 && sudo ./mongod --fork --logpath /var/log/mongodb.log |
No comments:
Post a Comment