Last active
August 29, 2015 14:19
-
-
Save timkellogg/d1920c8ef68af21d7e17 to your computer and use it in GitHub Desktop.
Useful Shell Commands
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
Find size of Rails app files in order | |
$ clear && ls -lr | awk '{ print $5 "--" $9 }' | sort -gr | |
Sample Output: | |
5563--Gemfile.lock | |
1814--Guardfile | |
821--Gemfile | |
408--config | |
306--testss | |
272--app | |
255--README.md | |
249--Rakefile | |
238--public | |
238--db | |
238--bin | |
204--tmp | |
170--log | |
153--config.ru | |
136--lib | |
102--vendor | |
40--Procfile | |
In Mac (have to install via homebrew) | |
$ tree -Is *.cache | |
Sample Output (is a tree of subdirectories) | |
Find out last write time files in current dir | |
$ ls -lr | awk '{ print $6,$8 }' | sort -r | |
Sample output: | |
Apr 22:15 | |
Apr 18:14 | |
Apr 14:39 | |
Apr 14:32 | |
Apr 14:26 | |
Apr 12:13 | |
Apr 12:13 | |
Apr 12:13 | |
Apr 12:13 | |
Apr 12:13 | |
Apr 12:13 | |
Apr 12:13 | |
Apr 11:46 | |
Apr 11:44 | |
Apr 11:42 | |
Apr 11:39 | |
Apr 11:10 | |
Apr 11:09 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Will keep updating as I make use of Shell commands