It is possible with ls to list only directories on a Linux system, but you can also list the inode values of the directories on a Linux system.
The example below shows how this is done. The -i parameter shows the đź“‚ inodes value.
┌──(john㉿DESKTOP-PF01IEE)-[~] └─$ ls -ldi -- */ 150 drwxr-xr-x 2 john john 4096 May 12 10:50 Documents/ 43846 drwxr-xr-x 3 john john 4096 Apr 19 10:24 Downloads/ |
This is how to print what filesystem type a folder is housed on.
┌──(john㉿DESKTOP-PF01IEE)-[~] └─$ df -PTh Documents/ | awk ' NR==2 {print $2}' ext4 |
That could also be very useful indeed.
This is another way to print the inode value of a directory on a Linux system.
┌──(john㉿DESKTOP-PF01IEE)-[~] └─$ stat Downloads/ | awk 'NR==3 {printf $4}' 43846 |
And yet another way to print the filesystem type a directory is located on.
┌──(john㉿DESKTOP-PF01IEE)-[~] └─$ df -T | awk 'NR==2 {printf $2}' ext4 |
This shows how flexible Linux is, you can get almost any information you desire from your Linux machine.