Paths
Absolute paths start from / (root of the filesystem). Relative paths start from your current directory and are shorter for day-to-day work.
Solaris · Files and Directories
Solaris · Lesson 6
Solaris filesystem structure and navigation. Permissions, ownership and ACL concepts. Copy, move and delete operations. Important system directories explained.
Almost everything in Unix-like systems is represented as a file or directory. If you can navigate the filesystem confidently, you can troubleshoot faster and understand how applications are laid out on a Solaris server.
In this lesson you will learn how to move around, create structure for projects, copy or move data and clean up safely using standard Solaris commands.
Absolute paths start from / (root of the filesystem). Relative paths start from your current directory and are shorter for day-to-day work.
Directories organise files. Commands like ls, cd and mkdir let you explore and build directory structures for your applications.
Files may be configs, logs, binaries or scripts. cat, more, less and tail help you inspect them without editing.
The following command sequences show realistic mini-scenarios. Try them in your Solaris VM to build muscle memory.
Use pwd to print the current directory and ls to see what files and folders exist there.
Absolute paths start from /, relative paths start from where you are right now.
mkdir creates directories, the -p option creates parent directories as needed, and touch creates empty files or updates timestamps.
cp copies files, cp -r copies directories; mv moves or renames files and folders.
Use rm for files, rmdir for empty directories and rm -r for directory trees. Be very careful with rm -r.
solaris-lab with subdirectories configs, logs and scripts.touch and list them with different ls options.rm, rm -r and rmdir, making sure you understand exactly what disappears at each step.In upcoming lessons, this directory knowledge will be used when we work with configuration files, logs, user homes and ZFS datasets.