-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCLI week2.txt
More file actions
60 lines (35 loc) · 1.24 KB
/
CLI week2.txt
File metadata and controls
60 lines (35 loc) · 1.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
1- to create a hidden file:
Samo@DESKTOP-9OF8KCH MINGW64 ~/Desktop/nthn
$ touch .Sam.txt
Samo@DESKTOP-9OF8KCH MINGW64 ~/Desktop/nthn
$ ls -a
./ ../ .Sam.txt
2-to creat nested directorie
Samo@DESKTOP-9OF8KCH MINGW64 ~/Desktop/nthn
$ mkdir -p sam/is/home/alone
Samo@DESKTOP-9OF8KCH MINGW64 ~/Desktop/nthn
$ ls
sam/
3- to go inside the directories
Samo@DESKTOP-9OF8KCH MINGW64 ~/Desktop/nthn
$ cd sam/is/home/alone
Samo@DESKTOP-9OF8KCH MINGW64 ~/Desktop/nthn/sam/is/home/alone
$ touch sam1.txt
4-to add a text inside a created file .
Samo@DESKTOP-9OF8KCH MINGW64 ~/Desktop/nthn/sam/is/home/alone
$ echo "test"> sam1.txt
Samo@DESKTOP-9OF8KCH MINGW64 ~/Desktop/nthn/sam/is/home/alone
$ echo "another test">> sam1.txt
Samo@DESKTOP-9OF8KCH MINGW64 ~/Desktop/nthn/sam/is/home/alone
$ wc -c sam1.txt
18 sam1.txt
to add a text inside a created file but wiuthout a newline .
Samo@DESKTOP-9OF8KCH MINGW64 ~/Desktop/nthn/sam/is/home/alone
$ echo -n "without a new line">>sam1.txt
Samo@DESKTOP-9OF8KCH MINGW64 ~/Desktop/nthn/sam/is/home/alone
$ echo -n "output">>sam1.txt
$ cat sam1.txt
test
another test
without a new lineoutput
Samo@DESKTOP-9OF8KCH MINGW64 ~/Desktop/nthn/sam/is/home/alone