Files & Permissions - Ch2 Flashcards
FHS
File Hierarchy System ;
Specifies directory structure, type of info to store, & how shared
Static directory
Holds static data & contains user and administrative commands, help files, library files, kernel and boot files;
/usr
/boot
/opt
Dynamic directory
Holds variable data containing log and spool files, config files, temp files, personal user files /var /etc /tmp /home
Static and shareable directories
/opt
/usr
Static and unshareable
/boot
/etc
Variable and shareable
/var/mail
/var/opt
Variable and unshareable
/var/lock
/run
/etc
holds sys config files
/root
Default home dir of root user
/media
To auto mount removable media
/mnt
To temp mount a file system
/bin and /usr/bin
To store admin commands
/lib, /usr/lib, /lib64, /usr/lib64
To store 32 and 64 bit library routines needed by various commands and programs
touch
Creates empty file and sets timestamp
cat
Create short text file;
ex: cat > catfile1 then enter text;
Press Ctrl+d to save and return to shell prompt
vi
Create and modify text files
mkdir
Make directory
ls
List directories
ll
List details;
short for ls -l
File / directory column information
Col 1: First char indicates file “-“ or dir “d”, remaining 9 char indicate permissions
Col 2: No of links
Col 3: Owner name
Col 4: Owning group
Col 5: Size in bytes (files) or blocks (dir)
Col 6,7,8: Mo, day and time of last modification
Col 9: Name of file or dir
less
Text filter for viewing long text files, forward and backward, before entire file is loaded;
more
Text filter for viewing long text files forward only
cp
Copy files and directories