New answers tagged directory-structure
You are using the ~/Applications/ Folder and Not /Applications. Try: cd /Applications And then: ls ~ Means home, which is /Users/user/. There is a users Application folder but it is very rarely used and it is for Applications that are installed for only that certain user. All default Applications are in /Applications.
/home is where all users usually get their home directories created under. Examples: /home/marcelo /home/joe The /home may sometimes reside in a different filesystem (i.e., a separate harddisk, another partition in the same harddisk or even network mounted) than the / (main system's filesystem). For this (and probably other reasons as well), the root ...
In case of trouble during booting (resulting in other volumes not being mounted) it helps that root (which is used for repair logins) has its home directory available. /home is often on a different volume.
According to the Filesystem Hierarchy Standard (FHS): /home : User home directories (optional) /root : Home directory for the root user (optional) A typical non-root user's home directory would be /home/$USER. /root is also special in that (in many distros) /root is readable only to root (700), but a normal user's home directory has read access to others ...
Not sure what you mean by "what filesystem". If it means what instance of a filesystem, then using df $(pwd) may be your best bet, except when you know that the file you are inspecting actually is a mountpoint on its own, than using mountpoint $(pwd) may be a better idea. If it means what type of filesystem, then use the common Linux utility stat, it only ...
I think df . is your best bet. The filesystem usage check is not that expensive (it doesn't have to count any blocks on disk, that information is readily available and stored in memory once the filesystem is mounted). Alternatives like comparing the current path against mount points by using a script would be more expensive.
Top 50 recent answers are included