Last active
August 29, 2015 14:19
-
-
Save chrisyeung1121/3275f47f02e1953ed11a to your computer and use it in GitHub Desktop.
linux command cheat sheet
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
# Check netstat | |
netstat -anp tcp | |
# List which apps are using port 5000 | |
lsof -i :5000 | |
# Check brew package info | |
brew info elasticsearch | |
# To start elasticsearch without launctl | |
elasticsearch --config=/usr/local/opt/elasticsearch/config/elasticsearch.yml | |
# Find the most recently changed file within a directory | |
## http://askubuntu.com/questions/61179/find-the-latest-file-by-modified-date | |
find . -type f -exec ls -lt \{\} \+ | head | |
``` | |
-rw-r--r-- 1 chrisyeung staff 899 Apr 17 00:58 ./db/schema.rb | |
-rw-r--r-- 1 chrisyeung staff 11740499 Apr 17 00:58 ./log/development.log | |
-rw-r--r-- 1 chrisyeung staff 4336 Apr 17 00:57 ./Gemfile.lock | |
-rw-r--r-- 1 chrisyeung staff 352 Apr 17 00:57 ./Gemfile | |
-rw-r--r-- 1 chrisyeung staff 237 Apr 17 00:55 ./config/database.yml | |
-rw-r--r-- 1 chrisyeung staff 472 Apr 16 23:34 ./tmp/cache/assets/development/sprockets/v3.0/3K2piOKDNTrVCWkh5JZnKIk7dEMp4A5onSlyHksKh7k.cache | |
``` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment