Basic Unix Skills
Basic Unix Skills is the substrate for everything else: navigation, pipelines, text processing, permissions, process control and finding the right manual page. Questions are practical - you are given a task and must choose the command that performs it in a BSD userland, which is not GNU.
Shell and pipelines
The POSIX sh is the scripting baseline, while FreeBSD's root shell is csh, which is why interactive idioms differ. Redirection: > overwrites, >> appends, 2>&1 merges stderr into stdout, < feeds stdin. Compose small tools: sort access.log | uniq -c | sort -rn | head -20 gives the top talkers. grep -r, cut -d: -f1, tr -s, sed -n and awk '{print $1}' cover most log work.
Permissions and ownership
ls -l shows mode, links, owner, group, size, time and name. chmod 750 means rwxr-x---; chmod g+s on a directory sets setgid so new files inherit the group; 1777 adds the sticky bit, as on /tmp. umask 022 yields 755 directories and 644 files. chown user:group changes ownership, and only root may give files away.
Finding, archiving and processes
find /var -type f -size +100M -mtime +30 prints large, old files; -exec or xargs acts on the results. bsdtar handles -z for gzip and -J for xz, and auto-detects compression on extraction. df -h shows free space per filesystem while du -sh sizes a tree. ps aux, top, kill -TERM, kill -9, nice and renice manage processes.
Worked example
List the ten largest files under /var/log with human-readable sizes: find /var/log -type f -exec du -h {} + | sort -rh | head -10. Reasoning: -exec with a terminating + batches arguments into few invocations, du -h produces readable sizes, sort -rh understands those suffixes where plain sort -n would not, and head truncates only after sorting is complete.
Traps
BSD ps, tar and find accept slightly different flags from GNU, and --help may not exist; check the man page. Deleting files from a pipeline while find is still walking a tree can skip entries, so prefer -delete. A umask of 077 hides new files from group members entirely. Man sections matter: fstab(5) documents the format, mount(8) the command.