I have been using unix systems the majority of my life. I often find myself teaching others about them. I get a lot of questions like "what is the /etc
folder for?" from students, and sometimes I have the same questions myself. I know that all of the information is available with a simple google search, but I was wondering if there are any tools or solutions that are able to add descriptions to folders (and/or files) that could easily be viewed from the command line? This could be basically an option to ls
or a program that does something similar.
- I would like there to be something like this:
$ ls-alt --show-descriptions / ... /etc – Configuration Files /opt – Optional Software /bin - Binaries /sbin – System Binaries /tmp – Temporary Files ...
- Could even take this a step further and have a verbose descriptions option:
$ ls-alt --show-descriptions-verbose / ... /etc – The /etc directory contains the core configuration files of the system, use primarily by the administrator and services, such as the password file and networking files. /opt – Traditionally, the /opt directory is used for installing/storing the files of third-party applications that are not available from the distribution’s repository. /bin - The ‘/bin’ directly contains the executable files of many basic shell commands like ls, cp, cd etc. Mostly the programs are in binary format here and accessible by all the users in the Linux system. /sbin – This is similar to the /bin directory. The only difference is that is contains the binaries that can only be run by root or a sudo user. You can think of the ‘s’ in ‘sbin’ as super or sudo. /tmp – This directory holds temporary files. Many applications use this directory to store temporary files. /tmp directories are deleted when your system restarts. ...
I know that there is no default way to do this with ls
, and to add such a feature would probably require a lot of re-writing of kernel code to account for the additional data being stored, so I'm not asking how to do this natively necessarily (unless there is an easy way I am overlooking). I am more asking if there is a tool that already exists for educational purposes that enables this sort of functionality? I guess it would take output from ls
and then do a lookup to match directory names to descriptions it has already saved somewhere, but I digress.
DESCRIPT.ION
files. Something like that could be implemented inls
without kernel changes, e.g. using an extended attribute.