The Command Line Crash Course // Starter Kit for Linux/Mac OSX
-
- 1 / 38
-
Cartes-fiches
pwd
printing working directory
hostname
my computer's network name
mkdir
make directory
cd
change directory
ls
list directory
rmdir
remove directory
pushd
push directory
popd
pop directory
cp
copy a file or directory
mv
move a file or directory
less
page through a file
cat
print/stream the whole file
xargs
execute arguments
find
find files
grep
find things inside files
man
read a manual page
apropos
find what man is appropriate
env
look at your environment
echo
print some arguments
export
export/set a new environment variable
exit
exit the shell
sudo
danger! become super user root Danger :-)
chmod
change permission modifiers
chown
change ownerchip
rm
removing a file
touch
Making Empty Files
rm -rf
removing a directory with files inside
cp -r
copy directories with files inside
|
The | takes the output from the command on the left, and "pipes" it to the command on the right.
<
The < will take and send the input from the file on the right to the program on the left.
>
The > takes the output of the command on the left, then writes it to the file on the right. [ersetzen]
>>
The >> takes the output of the command on the left, then appends it to the file on the right. [hinzufügen]
find . -name "*txt" -print | less
finde HIER (=.) in diesem Directory alle Files - die mit txt enden - und pipe sie mit less zu einer Page
Cat > file1.txt
Schnee
Winter
bald Frühling
(strg + d)
schreibe "Schnee Winter bald Frühling" (Eingabeende mit strg + d) in die Datei file1.txt
grep schne *txt > new.txt
schreibe in die Datei new.txt alle Pfade/txt-Files, die in einer txt Datei das Wort "schne" enthalten
example: apropos find
was gibt es in der Hilfe alles zu "find"?
example: man find
was sagt die Hilfe zu "find"?
env | grep jens
zeig die Umgebung und gib alles wieder mit "jens"