Ravindra Bagale · AWSसर्व coursesया course चे lessonsशोधाEnglish

AWS · मराठी आवृत्ती

3.2 Folders मध्ये फिरूया: navigation

रवींद्र बागले यांच्या course वर आधारित · सहज मराठीत explanation

या page मध्ये

Linux किंवा EC2 वर login करून हे commands स्वतः वापरा:

Commandअर्थउदाहरण
pwdसध्या कोणत्या directory मध्ये आहोत?pwd → /home/ubuntu
lsFiles ची listls, ls -l, ls -la, ls -lh /var/log
cdDirectory बदलाcd /etc; cd ..; cd ~; cd -
treeFolders चं tree; tree package लागू शकतोtree -L 2 /etc/nginx
clearScreen clearCtrl+L
historyआधीचे commandshistory | tail -20; !45 ने 45वा command पुन्हा
pwd                 # where am I?
ls -la              # long listing including hidden files (starting with .)
cd /var/log         # absolute path (starts with /)
cd ../www           # relative path (.. = parent, . = current)
cd ~                # go to home directory (same as just 'cd')
cd -                # go back to the previous directory

Absolute path / पासून; relative path सध्याच्या folder पासून. .. parent, . current, ~ home आणि cd - मागचा folder.

ls -l output वाचूया

-rw-r--r--  1 ec2-user ec2-user  1024 Mar  3 10:15 notes.txt
│└──┬───┘   │ └──┬───┘ └──┬───┘  └┬─┘ └─────┬────┘ └───┬───┘
│ permissions links owner  group   size  modified time   name
└─ type: - file, d directory, l symbolic link

क्रमाने file type, permissions, links, owner, group, size, modified time आणि नाव दिसतं. सुरुवातीला - file, d directory आणि l symbolic link.

वेळ वाचवणारे shortcuts

Tab autocomplete; दोनदा Tab ने options. ↑/↓ history; Ctrl+C command थांबवतो; Ctrl+R history search; Ctrl+A/Ctrl+E line ची सुरुवात/शेवट.

Lab

cd /var/log, ls -lh करून मोठी file शोधा. cd - ने परत या. history | tail -5 पाहून सुरक्षित जुन्या command ला !number ने पुन्हा run करा.