Professional Documents
Culture Documents
Files Commands
T / Ebtisam ALselwi 1
Files Commands
Function
Command
T / Ebtisam ALselwi 2
Files Commands(con … )
Function
Command
rm Delete a file
Function
Command
T / Ebtisam ALselwi 4
touch Command
std@ubuntu:~$ touch Ebtisam.txt
T / Ebtisam ALselwi 5
File Command
std@ubuntu:~$ file sample.txt
T / Ebtisam ALselwi 6
T / Ebtisam ALselwi 7
File Command
std@ubuntu:~$ file sample.txt
T / Ebtisam ALselwi 8
T / Ebtisam ALselwi 9
File Command
std@ubuntu:~$ file test
T / Ebtisam ALselwi 10
Cat Command
std@ubuntu:~$ cat sample.txt
sample line 1
sample line 2
sample line 3
sample line 4
sample line 5
sample line 6
sample line 7
sample line 8
sample line 9
sample line 10
sample line 11
sample line 12
sample line 13
sample line 14
sample line 15
sample line 16
sample line 17
sample line 18
sample line 19
sample line 20
T / Ebtisam ALselwi 11
Cat Command
std@ubuntu:~$ cat file1.txt
T / Ebtisam ALselwi 12
T / Ebtisam ALselwi 13
Cat Command
std@ubuntu:~$ cat sample.txt sample1.txt
sample line 1
sample line 2
sample line 3
sample line 4
sample line 5
sample line 6
sample line 7 To read more than
sample line 8
one file in same time ,
sample line 9
sample line 10 and merge them on
sample line 11 the screen only
sample line 12
sample line 13
sample line 14
sample line 15
sample line 16
sample line 17
sample line 18
sample line 19
sample line 20
line 1
line 2
T / Ebtisam ALselwi 14
Cat Command
std@ubuntu:~$ cat –n sample.txt sample1.txt
1 sample line 1
2 sample line 2
3 sample line 3
4 sample line 4
5 sample line 5
6 sample line 6
7 sample line 7
8 sample line 8
To read more than
9 sample line 9 one file in same time,
10 sample line 10 with merge them on
11 sample line 11 the screen only and
12 sample line 12
13 sample line 13 number each line
14 sample line 14
15 sample line 15
16 sample line 16
17 sample line 17
18 sample line 18
19 sample line 19
20 sample line 20
21
22 line 1
23 line 2
T / Ebtisam ALselwi 15
Cat Command
std@ubuntu:~$ cat sample.txt sample1.txt
>sample2.txt
To merge more
than one file
into a new file
T / Ebtisam ALselwi 16
Cat Command
std@ubuntu:~$ cat >sample1.txt
In the name of Allah
std@ubuntu:~$
To write in a file,
with delete all the
data that was
inside it, after
finishing typing in
the file press the
Enter key, then
press on
(Ctrl + d) to save
the file.
T / Ebtisam ALselwi 17
Cat Command
std@ubuntu:~$ cat>>sample1.txt
T/ Ebtisam ALselwi
To modify inside a
file written in it
and add new data
to it while
retaining data
Previously ،press
the Enter key, then
press on
(Ctrl + d) to save
the file.
T / Ebtisam ALselwi 18
Cat Command
T / Ebtisam ALselwi 19
tac Command
std@ubuntu:~$ tac sample1.txt
sample line 20
sample line 19
sample line 18
sample line 17
sample line 16
sample line 15
sample line 14
sample line 13
sample line 12
sample line 11
sample line 10
sample line 9
sample line 8
sample line 7
sample line 6
sample line 5
sample line 4
sample line 3
sample line 2
sample line 1
std@ubuntu:~$
T / Ebtisam ALselwi 20
Head Command
std@ubuntu:~$ head sample.txt
sample line 1
sample line 2
sample line 3
sample line 4
sample line 5
sample line 6
sample line 7
sample line 8
sample line 9
sample line 10
std@ubuntu:~$
T / Ebtisam ALselwi 21
Head Command
std@ubuntu:~$ head file1.txt
line 1
line 2
T / Ebtisam ALselwi 22
tail Command
std@ubuntu:~$ tail sample.txt
sample line 13
sample line 14
sample line 15
sample line 16
sample line 17
sample line 18
sample line 19
sample line 20
T / Ebtisam ALselwi 23
tail Command
std@ubuntu:~$ tail file1.txt
line 1
line 2
T / Ebtisam ALselwi 24
touch Command
std@ubuntu:~$ touch Ebtisam.txt
T / Ebtisam ALselwi 25
touch Command
std@ubuntu:~$ touch file1.txt file2.txt
T / Ebtisam ALselwi 26
rm Command
std@ubuntu:~$ rm Ebtisam.txt
T / Ebtisam ALselwi 27
cp Command
std@ubuntu:~$ cp sample.txt test/sample.txt
T / Ebtisam ALselwi 28
cp Command
std@ubuntu:~$ cp sample.txt test/sample1.txt
T / Ebtisam ALselwi 29
mv Command = rename
std@ubuntu:~$ mv sample.txt samplenew.txt
T / Ebtisam ALselwi 30
mv Command = move
std@ubuntu:~$ mv samplenew.txt
test1/samplenew.txt
T / Ebtisam ALselwi 31
T / Ebtisam ALselwi 32
wc Command
std@ubuntu:~$ wc -l sample1.txt
21 sample1.txt Count of lines
std@ubuntu:~$ wc -w sample1.txt
60 sample1.txt count of words
std@ubuntu:~$ wc -c sample1.txt
293 sample1.txt size of file in byte
std@ubuntu:~$ wc -m sample1.txt
293 sample1.txt count of characters
std@ubuntu:~$
T / Ebtisam ALselwi 33
grep Command
T / Ebtisam ALselwi 34
grep Command
T / Ebtisam ALselwi 35
grep Command
T / Ebtisam ALselwi 36
grep Command
T / Ebtisam ALselwi 37
End ….
T / Ebtisam ALselwi 38