Red Hat Enterprise Linux Essentials
Red Hat Enterprise Linux Essentials
Red Hat Enterprise Linux Essentials
RELATIVE PATH
Do not begin with a slash, specify location relative to your
current working directory
cd var
cd named
CHANGING DIRECTORIES
--> To an absolute path
ex: cd /<directory>/<subdirectory>
--> To an relative path
ex: cd <directory>
--> To your home directory (anyuser including root)
cd
--> To a your previous working directory
cd --> To a your previous directory
cd ..
LISTING DIRECTORY CONTENTS
--> ls ( lists the contents of the current directory)
--> ls -a (include hidden file)
--> ls -l (or) ll (long listing)
--> ls /usr (display contents of the directory)
--> ls *.<file extension>
--> ls -R (displays files including sub directories)
--> ls -ld (directory and symlink information)
(interactive)
(recursive)
(force)
CREATING DIRECTORY
--> mkdir <dir name> (creates the directories)
--> mkdir -p <home dir>/<new dir>
(creates the directory and sub directory)
REMOVING THE DIRECTORY
--> rmdir < Empty directory Name>
--> rm -i <dir Name>
(interactive)
(recursive)
(force)
file <filename>
Enter
/text
(quits)
PERMISSIONS TYPES
- Four symbols are used to when displaying permissions
r --> read the file or list a directory's contents
w --> write the file or create and remove files from directory
x --> permission to execute a program or change into a directory and do
a long listing of the directory
- --> no permissions.
Note: file permissions are viewed by "ls -l" and ll (long listing)