-
Notifications
You must be signed in to change notification settings - Fork 39
Expand file tree
/
Copy pathsession-03.txt
More file actions
107 lines (67 loc) · 2.09 KB
/
Copy pathsession-03.txt
File metadata and controls
107 lines (67 loc) · 2.09 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
absolute path
relative path
/c/devops/daws-88s/daws-88s -> absolute
daws-88s/daws-88s -> relative
cd -> change directory
clear
$ -> normal user
/home/ec2-user -> /home/<user-name>
sudo su -> root access
# -> super user
/root -> root user home directory
everything is command and text in linux
command-name <inputs> <options>
<inputs> <options> -> optional or mandatory based on the command
uname -> print os/kernel infromation
uname --help or man uname
CRUD -> create read update delete
ls -> list subdirectories
ls -l -> long format alphabetical order.. file/folder who owns it, size, timestamp
ls -lr
ls -lt -> latest files on top
ls -ltr -> latest files at bottom
cd -> to home directory from wherever you are
hidden files/folders start with .
ls -lart -> hidden files and folders
d rwx r-x r-x -> directory
- rwx r-x r-x -> file
cat > devops.txt -> enter the text you want
Press Enter and Ctrl+d
cat filename -> read the content in the file
> -> redirection, usually overrides the previous text
>> -> appends to the previous text
source -> which file to copy
destination -> destination
cp <source> <destination>
cp
mv -> rename or move the file
downloading files or softwares
wget and curl
https://dlcdn.apache.org/tomcat/tomcat-9/v9.0.113/bin/apache-tomcat-9.0.113.tar.gz
wget is used for downloading packages
curl -> shows the o/p on the screen, it will not download by default
curl is used to hit the API URL's
grep -> command to search inside the file
grep <word-to-search> <file>
-i -> case insensitive
-v -> non matching
-n -> display line numbers
-c -> matching line numbers count
display line number ending with the word architecture
$ -> ending charecter
^ -> starting charecter
ctrl + r start typing you can see the commands you used
$ -> ending
^ -> starting
tail -f <file-name> -> follow the log
head -> top 10 lines by default
tail -> bottom 10 lines by default
cut and awk
https://raw.githubusercontent.com/daws-88s/notes/refs/heads/main/session-02.txt
cut -d "/" -f1 <file-name>
/etc/passwd
awk -F "/" '{print $NF}'
Tomorrow's session
==================
vim editor
user management