Professional Documents
Culture Documents
Linux Command Line
Linux Command Line
Linux Command Line
Line
File system exploration
How is data stored at the
laptop?
File
System
Emily
Ű Control data
Ű Retrieve
data
File
System
Ű Store data into the named files
Ű Hierarchy of files
Ű Windows Explorer
Ű Finder
BASH
Ű command interpreter
Ű programming language
Ű actions
Ű cd
Ű
pwd
Ű du
Ű df
ls
ls [OPTION]... [FILE]...
ls
yandex — bash
ls
-l
yandex — bash
ls
-lh
yandex — bash
ls
-lSh
yandex — bash
cd
Ű change directory
cd [-L|-P]
directory
cd
yandex — bash
cd
/
yandex — bash
cd .
.
yandex — bash
cd
~
yandex — bash
pwd
pwd [OPTION]...
pwd
yandex — bash
du
du [OPTION]... [FILE]...
du
yandex — bash
df
df [OPTION]... [FILE]...
df
yandex — bash
question
Ű man pwd
Ű File system
Ű Bash
Ű To explore FS we
use:
Ű LS
Ű CD
Ű PWD
Ű DU
Ű DF
Ű To get help we use:
Ű MAN
How can we modify
files and
directories?
File system exploration commands
Ű mkdir
Ű cp
mv
Ű rm
Ű
touc
h
mkdir
yandex — bash
cp
yandex — bash
cp -r
yandex — bash
mv
yandex — bash
rm
rm [OPTION]... FILE...
rm
yandex — bash
rm -r
yandex — bash
touch
touch [OPTION]...
FILE...
touch
yandex — bash
touch
yandex — bash
quiz
Ű cat
Ű head
Ű tail
more
Ű less
Ű wc
Ű grep
ca
t
Ű displays the contents of a file at the command
line
head [OPTION]...
[FILE]...
hea
d
yandex — bash
head
-n
yandex — bash
tai
l
Ű prints the last part of files
tail [OPTION]...
[FILE]...
tai
l
yandex — bash
tail
-n
yandex — bash
mor
e
Ű displays text, one screen at a
ti me
mor
e
yandex — bash
les
s
Ű displays text, allows
scrolling
les
s
yandex — bash
w
c
Ű "word count" prints a count of lines,
words, and bytes for each file
wc [OPTION]... [FILE]...
w
c
yandex — bash
wc
-c
yandex — bash
wc
-l
yandex — bash
gre
p
Ű "global regular expression print" processes text and
prints any lines which match a specifi ed pattern
vim
Ű cut
Ű tr
Ű
sort
Ű
awk
Ű
speci
al
symb
olic:
|, ||,
vim
yandex — bash
vim
yandex — bash
vim
yandex — bash
vim
yandex — bash
vim
yandex — bash
tr -d
yandex — bash
sort
yandex — bash
sort -r
-k
yandex — bash
sort -r -k
-n
yandex — bash
awk
yandex — bash
awk
yandex — bash
operators
yandex — bash
>> operator
yandex — bash
operators
yandex — bash
More
operators!
Ű & make the command run in background
free
Ű top
Ű ps
Ű kill
free
free [options]
free
yandex — bash
free
-g
yandex — bash
top
top [options]
top
yandex — bash
ps
ps [options]
ps
yandex — bash
ps
a
yandex — bash
kill
Ű sends a signal to a
process
yandex — bash
kill
yandex — bash
Nice
=)
Ű runs a command with a modified scheduling
priority