AWS · मराठी आवृत्ती
3.2 Folders मध्ये फिरूया: navigation
Linux किंवा EC2 वर login करून हे commands स्वतः वापरा:
| Command | अर्थ | उदाहरण |
|---|---|---|
| pwd | सध्या कोणत्या directory मध्ये आहोत? | pwd → /home/ubuntu |
| ls | Files ची list | ls, ls -l, ls -la, ls -lh /var/log |
| cd | Directory बदला | cd /etc; cd ..; cd ~; cd - |
| tree | Folders चं tree; tree package लागू शकतो | tree -L 2 /etc/nginx |
| clear | Screen clear | Ctrl+L |
| history | आधीचे commands | history | 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 करा.