Access Linux File System in RHEL - RHCSA (RH124).pdf
support8872
3,855 views
19 slides
Sep 30, 2024
Slide 1 of 19
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
About This Presentation
Slides on how to access linux file system - Part of RHCSA (RH124) syllabus
Size: 997.76 KB
Language: en
Added: Sep 30, 2024
Slides: 19 pages
Slide Content
Access Linux File System
Linux
●Open-source
●Unix-like OS kernel
●Started by Linus Torvalds in 1991 as a
personal project
●Global developer collaboration led to
widespread adoption
Tux
●Official mascot created by Larry Ewing
●Represents coolness and stability
Source:https://greencloudvps.com/linux-distributions-e
verything-you-need-to-know.php
Features of Linux
Source: Features of Linux Operating System - Naukri Code 360
Display manual pages for a command
●Command: man <command>
Get information on a command's usage, options, and syntax.
●Command: <command> – – help
Get a one-line description of any command
●Command: whatis <command>
Get current directory path
●Command: pwd
Create a directory and then verify it using ‘ls’ command
●Command: mkdir <directory-name>
To change the current working directory
●Command: cd <directory-name>
Change directory to parent directory
●Command: cd ..
Stay in current directory
●Command: cd .
Change directory to home directory
●Command: cd ~
List all the disk partitions
●Command: fdisk -l
View the content, one page at a time
●Command: less </path/to/file>
View content of a file one screen at a time
●Command: more <file-name>
Head:
●Used to display starting lines of a file
●By default it shows the first 10 lines
●-n option specifies how many lines to display
●Command: head -n 5 <file-name>
Tail:
●Displays last lines of file
●By default shows last 10 lines of file
●-n option specifies how many lines to display
●-f option can be used to keep tail command running and display new
lines as they are appended to the file
●Command: tail -n 5 <file-name>
echo:
●Used to print text to terminal
●Command: echo <text>
●‘>’ redirects output into a file
●Takes output from echo (left) and redirects it to myfile.txt (right)
●Command: echo 'This is a sample text' > <file-name>
Find and replace text within a file
●Command: sed -i 's/{old_text}/{new_text}/' <file-name>
awk:
●Text processing tool
●Used for pattern scanning and processing in files or streams
●-F option allows setting a custom field delimiter with whitespace as
the default
●Transform files and produce formatted output lines
●Command: awk -F: '{print $1}' <file-name>
Find the full path of the bash shell
●Command: which bash
List previously executed commands in the current session.
●Command: history
Display detailed information about the file: file name , permissions and
timestamps