File system.

Files are the most important type of thing in a Unix system.
Provides a heirarchical (tree) naming structure for files (vs. traditional flat file structure per tape/disk). Start of the file system is the root directory, whose name is / (slash) [or it's called root and has no name]. Each directory contains the names of files and further (sub)directories. Directory is a file that contains information on how to find other files. Every file and directory has a parent directory (root is its own parent) Ordinary files are leaves of the tree.

The pathname is the sequence of directories that the file is in, starting with /. Absolute file name is unique in the system.

File is a named place to store information. A Unix file is (only) a sequence of chars (bytes): no formatting of file contents is provided by Unix. This is simple and uniform, there are no multiple file formats that Unix has to deal with. File is independant of an application. Any internal structure or format of a file is the responsiblity of the program or application that uses the file. No concept of records, no access methods. File can be accessed sequentially and randomly. File contains whatever user puts into it; no structure except what the user imposes. Not even the newline char meaning the end of a line is known by the kernel (except device driver).
Executable files are identified by permissions, not by name (e.g. DOS extension).

Chars can flow from one program to another; simplicity of interconnection. A common interface. Programs can pass their output directly to other programs as their input. Programs expect a stream of chars as input and send a stream of chars as output.
There is no end-of-file marker in a file.
"File" as source of input or target of output, eg. devices are files in Unix.

File and directory names are limited to 255 chars. Any char except / and null character, (includes (invisible) control chars, space, newline), can be part of a filename, e.g. f!@#$%^&*() is a valid, albeit undesirable, filename. Novices somehow manage to create such filenames.
Each user has a home directory assigned by Sys Admin, specified in password file (/etc/passwd); is the pwd upon login. ~username equals the pathname of the user's home directory.
A logged-on user always has a current working directory; the directory the user is "in". An attribute of the process. Filenames specified are relative to the pwd (unless start with /, then is absolute).

df: info about filesystems. Availability, capacity, percent used, number of files. -i inodes -T type
du: info about disk usage. Number of blocks allocated to files. du -s for summary.
Hard links (to files only) create DAG. Symbolic/Soft links to ancestor directory creates cycle: subdir B of A has link in it that links to A.
find command: search "database" of filenames: owner, size, timestamps etc.
find / -size +1000 -mtime +30 -exec ls -l {}\; #does ls -l on files >1MB unmodifed in 30 days
find / -type f \(-perm -2000 -o -perm -4000 \) -print #finds setuid and sgid files
fuser shows user of a file
quota to limit disk space used by a user
ulimit -f maximum file size user can create

/proc/partitions
/proc/swaps