File Operations Flashcards
Native filesystems are ?
+ ext3
+ ext4
+ squashfs
+ btrfs
Important files required to run the system are stored on ?
root or /
A mount point is ?
A directory where the filesystem is to be grafted on.
To mount a partition, use command ?
sudo mount dir1 dir2
To unmount a partition, use command ?
sudo umount dirName
To know static information about the filesystem ?
fstab
To display all presently mounted filesystems ?
mount
To display information about mounted filesystems, including the filesystem type, and usage statistics about currently used and available space.
df -Th
NFS stands for ?
Network Filesystem
NFS server is ?
A computer that has a filesystem sit on its disk and this computer makes that filesystem available to other computers on the network.
NFS client is ?
A computer that accesses the filesystem on a NFS server.
The /bin directory contains what ?
Executable binaries, essential commands used to boot the system and essential commands required by all the users such as cat, cp, ls, mv, ps and rm.
The /sbin directory constains what ?
Essential binaries related to system administration such as fsck and ip.
/proc filesystem is also called ?
pseudo-filesystem
/dev filesystem contains ?
Device nodes - pseudo file used by most software and hardware devices except network devices.
/var filesystem contains ?
Files that are expected to change in size and content as the system is running. \+ System log files : /var/log \+ Packages and database files: /var/lib \+ Print queue : /var/spool \+ Temporary files: /var/tmp
/etc filesystem contains ?
System configuration files.
/boot directory contains ?
Essential files needed to boot the system.
/lib contains ?
Libraries for essential programs in /bin and /sbin.
/usr contains ?
Multi-use applications, utilities and data, non essential programs and scripts.
/tmp contains ?
Temporary files.
diff is used to ?
Comparing files and directories.
To compare 3 files at once, use ?
diff3
A patch files does ?
Contains the changes required to update an older version of a file to a new one.
To determine the real nature of a file in Linux, use command ?
file fileName
To copy a file ?
cp source destination
To recursively copy one directory tree to another (both remotely and locally) ?
rsync source destination
Commands to perform compression in Linux ?
gzip, bzip2, xz, zip
To compress all files in folder in Linux ?
gzip *
To decompress a file named file.txt.gz in Linux ?
gunzip file.txt.gz or gzip -d file.txt.gz
To examine and decompress archives from other operating system ?
zip
What is archive in Linux ?
The process of combining multiple files and directories from same or different sizes into one file.
Archiving is usually used as part of a system backup or when moving data from one system to another.
To create or extract files from an archive file ?
tar