April
1st,
2015
get Start with the Commandline List by Lucas Gatsas
Basics Commandlines for Os X / Unix. See a list pf ComamndsLines for Mac Os X or Download or Clone the Git via Github.
Installing Command Line Tools in Mac OS X
Launch the Terminal, found in
/Applications/Utilities/
Commands | Source |
---|---|
npmjs.com | Download it @ npmjs.com |
$ cd |
Run Terminal and type npm -v |
$ cd ~ |
Home directory, e.g. 'cd ~/folder/' |
$ cd / |
Root of drive |
$ ls |
List the Directory |
$ ls -a |
Listing incl. hidden files |
$ ls -l |
Long listing |
$ ls -lh |
Long listing with Human readable file sizes |
$ ls -R |
Entire content of folder recursively |
$ ls -R |
Entire content of folder recursively |
npmjs.com | Download it @ npmjs.com |
$ pwd |
Print Working Directory |
$ cp |
Copy File and Folder |
npmjs.com | Download it @ npmjs.com |
$ mv |
Move |
$ rm |
Remove Directory |
npmjs.com | Download it @ npmjs.com |
$ mkdir |
Make Directory |
$ rmdir |
Remove Directory |
$ open |
Open the Directory, File Folder and all Files. |
$ kill killall |
Process End-ing. Kill All. |
$ whoami |
Who am i ? | $ su |
Switch User - User Changes |
$ sudo |
Substitute User Do - Give a Command as Superuser (Root). |
$ pbcopy |
Pasteboard Copy |
$ pbpaste |
Pasteboard Past |
$ say |
Let Computer Speaking |
$ date |
Show Date and Time. |
$ nano |
Text -Editor in Terminal. |
$ screencapture |
Make Screenshots |
$ find |
Find Files. |
$ mdfind |
Mac Spotlight. Search Entry Computer |
$ ps |
List all Activiti Process |
$ top |
List detail Process List. |
$ history |
List all last Commands. |
$ clear |
Clear your terminal Windows |
$ man |
Man-Page - Show the Man Site to the Command. |
$ which |
Which Command? |
$ whatis |
Short Info for the Command. |
npmjs.com | Download it @ npmjs.com |
$ chflags nohidden ~/Library |
Library-Ordner unter Mac OS Lion anzeigen |
$ ping 127.0.0.1 |
pingt ein Netzwerkgerät um unter Mac OS Ping zu stoppen CTRL+C drücken |
$ top |
Zeigt eine Liste von laufenden Prozessen an, ähnlich der Aktivitätsanzeige. |
$ defaults write com.apple.
Finder AppleShowAllFiles
TRUE;
killAll Finder |
Zeigt versteckte Dateien im Finder an. |
$ defaults write com.apple.
Finder AppleShowAllFiles
TRUE;
killAll Finder |
Zeigt versteckte Dateien im Finder an. Mavericks |
$ defaults write com.apple.
ScreenCapture type JPG;
killAll SystemUIServer |
Stellt das Format für Screenshots auf JPG, weitere mögliche Formate sind: PNG, PDF, TIFF, JPEG, BMP, GIF, PSD. | $ defaults write
com.apple.Screencapture location
/Users/benutzername;
killAll SystemUIServer
|
Ändert den Speicherordner für Screenshots auf Euren Benutzerordner. |
$ dscacheutil -flushcache |
Startet Quick Look neu & läd ggf. neue Plugins. |
$ ipconfig getifaddr en0 |
Get Your Network IP Address |
$ curl ipecho.net/plain;
echo |
Get Your External IP Address |
$ ping -c 10 www.example-
site.com |
Test Network Connectivity |
$ system_profiler |
A Closer Look at System Information |
$ pwd |
The current directory |
$ ps -ax |
Job control While Activity Monitor is useful, it's not quite as useful as working with the shell. To get a list of every running process on your computer, type this: |
$ hostname |
To get your current location, use the "hostname" command. |
ShortCommands | Download it @ npmjs.com |
Ctrl + A |
Go to the beginning of the line you are currently typing on |
Ctrl + C |
Kill whatever you are running |
Ctrl + D |
Exit the current shell |
Ctrl + E |
Go to the end of the line you are currently typing on |
Ctrl + H |
Same as backspace |
Ctrl + L |
Clears the Screen |
Ctrl + K |
Clear the line after the cursor |
Ctrl + R |
Lets you search through previously used commands |
Ctrl + T |
Swap the last two characters before the cursor |
Ctrl + W |
Delete the word before the cursor |
Esc + T |
Swap the last two words before the cursor |
Alt + F |
Move cursor forward one word on the current line |
Alt + B |
Move cursor backward one word on the current line |
Tab |
Auto-complete files and folder names |
Command + K |
Clears the Screen |
History Commands | Download it @ npmjs.com |
history n |
Shows the stuff typed - add a number to limit the last n items |
ctrl-r |
Interactively search through previously typed commands |
![value] |
Execute the last command typed that starts with 'value' |
!! |
Execute the last command typed |
File Commands | Download it @ npmjs.com |
touch [file] |
Create new file |
pwd |
Full path to working directory |
.. |
Parent/enclosing directory, e.g. |
'ls -l ..' |
= Long listing of parent directory |
'cd ../../' |
= Move 2 levels up |
. |
Current folder |
cat |
Concatenate to screen |
rm [file] |
Remove a file, e.g. rm [file] [file] |
rm -i [file] |
Remove with confirmation |
rm -r [dir] |
Remove a directory and contents |
rm -f [file] |
Force removal without confirmation |
rm -i [file] |
Will display prompt before |
cp [file] [newfile] |
Copy file to file |
cp [file] [dir] |
Copy file to directory |
mv [file] [new filename] |
Move/Rename, e.g. mv -v [file] [dir] |
mv [file] [new filename] |
Move/Rename, e.g. mv -v [file] [dir] |
DirectoryCommands | Download it @ npmjs.com |
mkdir [dir] |
Create new directory |
mkdir -p [dir]/[dir] |
Create nested directories |
rmdir [dir] |
Remove directory ( only operates on empty directories ) | rm -R [dir] |
Remove directory and contents |
Pipes Commands | Allows to combine multiple commands that generate output |
more |
Output content delivered in screensize chunks |
> [file] |
Push output to file, keep in mind it will get overwritten |
>> [file] |
Append output to existing file |
< |
Tell command to read content from a fi |
Help Commands | Allows to combine multiple commands that generate output |
[command] -h |
Offers help |
[command] --help |
Offers help |
[command] help |
Offers help |
reset |
Resets the terminal display |
man [command] |
Show the help for 'command' |
whatis [command] |
Gives a one-line description of 'command' |
$ git clone git://github.com/joyent/node.git