Please enable JavaScript.
Coggle requires JavaScript to display documents.
Linux lec 6 - Coggle Diagram
Linux lec 6
Commands to
create file
cat
create with
content
cat > file
.............
.............
.............
ctrl + d
create file or
show content
cat filename
touch
creates multiple
empty files
cat file1 file2 file3
vi / vim
nano
Also edit files
[cmd] filename
ls
show files of
current directory
ls directory
ls -l = ll
(long listing)
ls -a
(hidden)
TimeStamps
Access Time
When accessed last time
Modify Time
When modified last time
Change Time
When metadata was changed
sign
$ = Any User
'#' = Root User
Switch user to root
sudo su
super user do (sudo)
switch user (su)
Cat
Tasks
Add to file
cat >> file
Concatenate
Files
cat file1 file2 > file3
Copy Files
cat file1 > file2
Show content in
reverse order
tac file
stat
Show all Timestamps
stat file
touch
tasks
Change all
Timestamps
touch file
Change only
one Timestamp
touch -a file
(access time)
touch -m file
(modify time)
vi / vim
vi file
:w (save file)
:wq or :x
(save and quit)
:q (only quit)
:q! (forcefully quit)
H,J,K,L to
move cursor
'i' for insertion mode
esc to exit insertion mode
nano
nano file
ctrl + X
(exit)
ctrl + O
(overwrite)
Start machine
on AWS
Linux 2
AMI
T2 micro
Add Tag
Name => Linux
SSH
Source = Anywhere
Set Key pair name
Download Key Pair
Follow lec 3
Instance
history
Shows History