What is i-node? | i-node is a structer that stores all information about file except its name and data. Information is stored in numerical value |
displays i-node of files | ls -i |
displays information on a file stored in its i-node | stat file_name |
What are block devices? | File type that refers to mass storage devices
Allow for random buffered access to devices
lsblk -lists block devices |
What are character devices? | File type that refers to both pysical devices and system byte generators
Allow for sequential unbuffered access to devices |
What are hidden files? | Files that start with a dot
rm command skips hidden caracters, hence * wildcard doesnt work .* must be used |
How to protect directory from removing it by accident? | Put there hidden file |
displays directory content size recursively | du -sh
h stand for human readable, particular files are distinguished
note that it includes hidden files |
lists all files that are open | lsof
lsof somefile -displays information on selected file |
copies count block of the bs size from if to the of file | dd if=input_file of=output_file count=how_many bs=block_size |
Which file system is assumed in most unix distros | ext4 |
What is disk partitioning in linux? | It enables to split hard drive into separate sections that act independently |
command for partiton management | fdisk
it requires root privileges |
BSD terminology
slice
partitions | fdisk partition
logical disks |
Command used to create file system | mkfs [-t type] device
mkfs.type device |
What is mounting of file system? | Attaching file system to existing file system
root file system is mounted as a top-level one |
command used to mount file system | mount [-t type] [-o options] device mountpoint |
command used to dismpunt file system | umount device|mountpoint |
command that displays disk usage for all mounted file systems | df -h |
command that checks and repairs file systems | fsck |
What is FHS | FHS=file hiereachy standard |