Linux file system nevigation
-
Upload
hetaldobariya -
Category
Education
-
view
208 -
download
4
description
Transcript of Linux file system nevigation
![Page 1: Linux file system nevigation](https://reader035.fdocuments.in/reader035/viewer/2022062405/55630d75d8b42a81528b46c7/html5/thumbnails/1.jpg)
Presented By Presented By :- Miss. Sonal Sabhaya:- Miss. Sonal Sabhaya&&
Miss. Hetal DobariyaMiss. Hetal Dobariya
(FY.M.Sc(IT&CA))(FY.M.Sc(IT&CA))
Submitted TO Submitted TO :- :-
Miss. Rachana KamaliaMiss. Rachana Kamalia
![Page 2: Linux file system nevigation](https://reader035.fdocuments.in/reader035/viewer/2022062405/55630d75d8b42a81528b46c7/html5/thumbnails/2.jpg)
Index
IntroductionFile System Hierarchy StandardTypes of fileAcces Mode of files and directoryChanging PermissionNavigation Command
Linux File System
![Page 3: Linux file system nevigation](https://reader035.fdocuments.in/reader035/viewer/2022062405/55630d75d8b42a81528b46c7/html5/thumbnails/3.jpg)
Introduction
All data in Linux organized into files. All files are organized into directories. These directories are organized into a tree-like
structure called the file system.Linux file system also enables you to group files
into directories, which is similar to folder you create in windows explorer
Linux File System
![Page 4: Linux file system nevigation](https://reader035.fdocuments.in/reader035/viewer/2022062405/55630d75d8b42a81528b46c7/html5/thumbnails/4.jpg)
Filesystem Hierarchy Filesystem Hierarchy StandardStandard
Defines the main directories and their contents in most Linux-based systems
There is not any drive C:, D:, … All directories are under “/”
“/” is the root directory It is possible
to have multiple partitions to multiple filesystems
Linux File System
![Page 5: Linux file system nevigation](https://reader035.fdocuments.in/reader035/viewer/2022062405/55630d75d8b42a81528b46c7/html5/thumbnails/5.jpg)
![Page 6: Linux file system nevigation](https://reader035.fdocuments.in/reader035/viewer/2022062405/55630d75d8b42a81528b46c7/html5/thumbnails/6.jpg)
Filesystem Hierarchy Standard (continued)…
Linux File System
![Page 7: Linux file system nevigation](https://reader035.fdocuments.in/reader035/viewer/2022062405/55630d75d8b42a81528b46c7/html5/thumbnails/7.jpg)
cont….
Linux File System
![Page 8: Linux file system nevigation](https://reader035.fdocuments.in/reader035/viewer/2022062405/55630d75d8b42a81528b46c7/html5/thumbnails/8.jpg)
cont….
Linux File System
![Page 9: Linux file system nevigation](https://reader035.fdocuments.in/reader035/viewer/2022062405/55630d75d8b42a81528b46c7/html5/thumbnails/9.jpg)
Types of file
-> Ordinary Files:
An ordinary file is a file on the system that contains data, text, or
program instructions.
-> Directories:
Directories store both special and ordinary files. For users
familiar with Windows or Mac OS, UNIX directories are equivalent
to folders.
Linux File System
![Page 10: Linux file system nevigation](https://reader035.fdocuments.in/reader035/viewer/2022062405/55630d75d8b42a81528b46c7/html5/thumbnails/10.jpg)
Types of file
-> Special Files:
Some special files provide access to hardware such as hard
drives, CD-ROM drives, modems, and Ethernet adapters. Other
special files are similar to aliases or shortcuts and enable you to
access a single file using different names.
Linux File System
![Page 11: Linux file system nevigation](https://reader035.fdocuments.in/reader035/viewer/2022062405/55630d75d8b42a81528b46c7/html5/thumbnails/11.jpg)
File Access Mode
Linux File System
Read:
Grants the capability to read ie. view the contents of the file.
Write:
Grants the capability to modify, or remove the content of the file.
Execute:
User with execute permissions can run a file as a program.
![Page 12: Linux file system nevigation](https://reader035.fdocuments.in/reader035/viewer/2022062405/55630d75d8b42a81528b46c7/html5/thumbnails/12.jpg)
Directory Access Modes
Linux File System
Read:Access to a directory means that the user can read the
contents. The user can look at the filenames inside the directory.
Write:Access means that the user can add or delete files to the
contents of the directory.Execute:
A user must have execute access to the bin directory in order to execute ls or cd command.
![Page 13: Linux file system nevigation](https://reader035.fdocuments.in/reader035/viewer/2022062405/55630d75d8b42a81528b46c7/html5/thumbnails/13.jpg)
Interpreting the Mode
Linux File System
![Page 14: Linux file system nevigation](https://reader035.fdocuments.in/reader035/viewer/2022062405/55630d75d8b42a81528b46c7/html5/thumbnails/14.jpg)
Changing Permission
Linux File System
chmod (change mode) command: Change mode (permissions) of files or directories.
Permissions stored in a file’s. New files given rw-rw-rw- permissions by default
![Page 15: Linux file system nevigation](https://reader035.fdocuments.in/reader035/viewer/2022062405/55630d75d8b42a81528b46c7/html5/thumbnails/15.jpg)
Changing Permission
Linux File System
![Page 16: Linux file system nevigation](https://reader035.fdocuments.in/reader035/viewer/2022062405/55630d75d8b42a81528b46c7/html5/thumbnails/16.jpg)
Navigating the File System
Linux File System
• Pwd (Present Working Directory)
• cd
• ls
![Page 17: Linux file system nevigation](https://reader035.fdocuments.in/reader035/viewer/2022062405/55630d75d8b42a81528b46c7/html5/thumbnails/17.jpg)
Using the pwd Command
Linux File System
pwd stands for Print Working Directory. pwd is a Linux / Unix command which prints the current working
directory. pwd prints the full pathname of the current working directory.
Syntax pwd [OPTION]...
![Page 18: Linux file system nevigation](https://reader035.fdocuments.in/reader035/viewer/2022062405/55630d75d8b42a81528b46c7/html5/thumbnails/18.jpg)
Using the pwd Command
Linux File System
-P, --physicalPrint the Physical Directory Path Without any Sysmbolic Link.
--help Display a help message.
--version Display version information.
![Page 19: Linux file system nevigation](https://reader035.fdocuments.in/reader035/viewer/2022062405/55630d75d8b42a81528b46c7/html5/thumbnails/19.jpg)
Using the pwd Command
Linux File System
Examples:$ pwd /home/IT
and the computer prints out /home/IT, that means that the directory the user is currently in is /home/IT. In the following example, the user is located in the directory /usr/local/bin, uses the command pwd, uses the command cd .. to move back to the parent directory and then uses pwd again:Example: $ pwd /usr/local/bin $ cd .. $ pwd /usr/local
![Page 20: Linux file system nevigation](https://reader035.fdocuments.in/reader035/viewer/2022062405/55630d75d8b42a81528b46c7/html5/thumbnails/20.jpg)
Using the cd Command
Linux File System
The Linux cd command stands for change directory. It is the primary command for moving between directories on a
Unix/Linux filesystem. Syntex: cd [directory]
Here directory is the name of the directory where you wish to go.
.
![Page 21: Linux file system nevigation](https://reader035.fdocuments.in/reader035/viewer/2022062405/55630d75d8b42a81528b46c7/html5/thumbnails/21.jpg)
Examples of cd command
Linux File System
Change working directory to /abc/xyzpwd
/home/ITcd /abc/xyz
pwd/abc/xyz
Change working directory to user’s home directorypwd/etc/BCA
cd ~orcdpwd
/home/IT Change working directory to parent directory.
cd ..
![Page 22: Linux file system nevigation](https://reader035.fdocuments.in/reader035/viewer/2022062405/55630d75d8b42a81528b46c7/html5/thumbnails/22.jpg)
Examples of cd command
Linux File System
Change working directory to parents parent directory or two levels up in the directory structure.
cd ../..
Using wildcards
cd /v*
The * wildcard characters can be interpreted as "any number of any character", so the Linux system expands the /v* that typed into
/var
Change the working directory to /var/ftp without mentioning ftp fully.cd /var/ft?This will change the directory to /var/ftp
![Page 23: Linux file system nevigation](https://reader035.fdocuments.in/reader035/viewer/2022062405/55630d75d8b42a81528b46c7/html5/thumbnails/23.jpg)
Pushd command
Linux File System
Use pushd command to change the directory. This is similar to cd command.
It saves the current working in memory .
Ex. pushd /var/ftp/pub
![Page 24: Linux file system nevigation](https://reader035.fdocuments.in/reader035/viewer/2022062405/55630d75d8b42a81528b46c7/html5/thumbnails/24.jpg)
Using the ls Command
Linux File System
ls is a Linux shell command that lists directory contents and Files.
ls syntax
$ ls [options] [file|dir]
# ls
0001.Pcap Desktop Downloads index.html install.log.syslog Pictures Templates anaconda-ks.cfg Documents fbcmd_update.php install.log Music Public Videos
![Page 25: Linux file system nevigation](https://reader035.fdocuments.in/reader035/viewer/2022062405/55630d75d8b42a81528b46c7/html5/thumbnails/25.jpg)
Using the ls Command
Linux File System
ls -a list all files including hidden file starting with '.'
ls -d list directories - with ' */'
ls -F It differenciate files and directory.
ls -i list file's inode index number
ls -l list with long format - show permissions
ls -la list long format including hidden files
ls -lh list long format with readable file size
![Page 26: Linux file system nevigation](https://reader035.fdocuments.in/reader035/viewer/2022062405/55630d75d8b42a81528b46c7/html5/thumbnails/26.jpg)
Using the ls Command
Linux File System
l
ls -ls list with long format with file size
ls -r list in reverse order
ls -R list recursively directory tree
ls -s list file size
ls -S sort by file size
ls -t sort by time & date
ls -X sort by extension name
![Page 27: Linux file system nevigation](https://reader035.fdocuments.in/reader035/viewer/2022062405/55630d75d8b42a81528b46c7/html5/thumbnails/27.jpg)
Using the ls Command
Linux File System
l
# ls -a
. .bashrc Documents .gconfd install .log .nautilus .pulse-cookie .. .cache Downloads .gnome2 install .log.syslog .netstat.swp .recently-used.xbel 0001 .pcap .config .elinks
# ls -F
0001.Pcap Desktop/ Downloads/ index.html install.log.syslog Pictures/ Templates/ anaconda-ks.cfg Documents/ fbcmd_update.php install.log Music/
$ ls -1
bin boot cdrom dev
//Display One File Per Line Using ls -1
![Page 28: Linux file system nevigation](https://reader035.fdocuments.in/reader035/viewer/2022062405/55630d75d8b42a81528b46c7/html5/thumbnails/28.jpg)
Using the ls Command
Linux File System
l
$ ls / /*List root directory*/
$ ls .. List /*parent directory*/
$ ls ~ /*List user's home directory*/
$ ls * /*List all subdirectories*/
$ ls *.txt /*List only text files with wildcard*/
$ ls > out.txt /*ls redirection to output file*/
![Page 29: Linux file system nevigation](https://reader035.fdocuments.in/reader035/viewer/2022062405/55630d75d8b42a81528b46c7/html5/thumbnails/29.jpg)
Using the ls Command
Linux File System
l# ls -lS
total 176 -rw-r--r--. 1 root root 48867 Jul 31 02:17 install.log -rw-r--r--. 1 root root 46701 Jul 31 09:58 index.html -rw-r--r--. 1 root root 21262 Aug 12 12:42 fbcmd_update.php -rw-r--r--. 1 root root 11439 Jul 31 02:13 install.log.syslog drwxr-xr-x. 2 root root 4096 Jul 31 02:48 Desktop drwxr-xr-x. 2 root root 4096 Jul 31 02:48 Documents drwxr-xr-x. 4 root root 4096 Aug 16 02:55 Downloads drwxr-xr-x. 2 root root 4096 Jul 31 02:48 Music drwxr-xr-x. 2 root root 4096 Jul 31 02:48 Pictures drwxr-xr-x. 2 root root 4096 Jul 31 02:48 Public drwxr-xr-x. 2 root root 4096 Jul 31 02:48 Templates drwxr-xr-x. 2 root root 4096 Jul 31 02:48 Videos -rw-------. 1 root root 1586 Jul 31 02:17 anaconda-ks.cfg -rw-r--r--. 1 root root 683 Aug 19 09:59 0001.pcap
![Page 30: Linux file system nevigation](https://reader035.fdocuments.in/reader035/viewer/2022062405/55630d75d8b42a81528b46c7/html5/thumbnails/30.jpg)
Using the ls Command
Linux File System
l
# ls -i 20112 0001.pcap 23610 Documents 23793 index.html 23611 Music 23597 Templates 23564 anaconda-ks.cfg 23595 Downloads 22 install.log 23612 Pictures 23613 Videos 23594 Desktop 23585 fbcmd_update.php 35 install.log.syslog
![Page 31: Linux file system nevigation](https://reader035.fdocuments.in/reader035/viewer/2022062405/55630d75d8b42a81528b46c7/html5/thumbnails/31.jpg)
That’s All About Linux File System Navigation
Linux File System
l
![Page 32: Linux file system nevigation](https://reader035.fdocuments.in/reader035/viewer/2022062405/55630d75d8b42a81528b46c7/html5/thumbnails/32.jpg)
Thank You
Linux File System
l