Created
January 13, 2010 19:25
-
-
Save codegoalie/276506 to your computer and use it in GitHub Desktop.
Handy 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
| # Rotate the screen for e-reading | |
| xrandr -o left | |
| xrandr -o normal | |
| # Batch modify 2880x900 .png's down to 1440x900 and then resize 50% with imagemagick | |
| mogrify -crop 1440x900+1440 -resize 50% *.png | |
| #To seach and replace in multiple files: | |
| grep -rl OLDSTRING . | xargs sed -i "s/OLDSTRING/NEWSTRING/g" | |
| #(Can also use other char for delimiter in regex: i.e. "s:OLDSTRING:NEWSTRING:g") | |
| # lftp command line FTP | |
| lftp -u username,password site_address | |
| mput -d path/to/file/same/on/remote/as/local | |
| #move files out of subdirectories (like Photos/2010/1/17/) | |
| find <root of your subdirectories> -type f -exec mv {} <target directory> \; | |
| #display random hex values in a infinite scrolling fashion: | |
| # found here: http://unix.stackexchange.com/questions/21347 | |
| export GREP_COLOR='1;32'; cat /dev/urandom | hexdump -C | grep --color=auto "ca fe" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment