Last active
August 29, 2015 14:06
-
-
Save trentbrooks/0d317dd13b9ac36cb51c to your computer and use it in GitHub Desktop.
Terminal shortcuts
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
VIEW RUNNING APPS | |
top | |
SSH INTO MACHINE | |
ssh [email protected] | |
SSH REMOTE TO LOCAL COPY | |
scp [email protected]:/Users/trentbrooks/Desktop/150327_Background.png bg.png | |
SSH REMOTE TO LOCAL COPY (FOLDER + RECURSIVE) | |
scp -r [email protected]:/Users/trentbrooks/Desktop /home/user/Desktop/ | |
SSH LOCAL TO REMOTE COPY | |
scp bg.png pi@raspberrypi:~/openFrameworks/apps/lightwell/bg.png | |
COMBINE FILES | |
cat file1.txt file2.txt > newfile.txt | |
SPLIT FILES INTO 1MB CHUNKS (bike.jpg becomes filea, fileb, etc) | |
split -b 1m bike.jpg ../test/file | |
GET ORIGINAL FILE FROM SPLIT | |
cat ../test/file* > bike2.jpg | |
ZIP FILES | |
zip newarchive.zip bike.jpg hello.js | |
ZIP DIRECTORY | |
zip -r newarchive.zip ../test | |
UNZIP | |
unzip newarchive.zip | |
SCREENSHOT | |
screencapture ../test/screenshot.png | |
SCREENSHOT TO CLIPBOARD | |
screencapture -c | |
FIND FILES CONTAINING TEXT | |
grep -lir "some text" * | |
FIND FILES CONTAINING TEXT FASTER | |
mdfind "On 19 January 1936" | |
FIND FILE | |
find ../ -name ant.png | |
FIND FOLDER | |
find . -name lightwellOF -type d | |
TALK | |
say 'hello world!' | |
LION DISPLAY LIBRARY FOLDER | |
chflags nohidden ~/Library/ | |
VIEW HIDDEN FILES | |
defaults write com.apple.Finder AppleShowAllFiles YES | |
defaults write com.apple.Finder AppleShowAllFiles NO | |
CREATE A SHELL SCRIPT | |
// place commands in a text file with .sh for terminal use or .command for double click. eg. | |
#!/bin/bash | |
echo "Hello, World!" | |
// from terminal | |
chmod a+x somefile.command | |
RUN SIMPLE PYTHON SERVER (navigate to folder to make that the localhost pointer) | |
python -m SimpleHTTPServer | |
SAY | |
say -o /Users/trentbrooks/Documents/Openframeworks/OF_081/apps/trentbrooks/HarpasNightLight/bin/data/sound2/blue.caf --data-format=LEF64@44100 blue |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment