Last active
October 13, 2015 13:33
-
-
Save 7171u/e81d9be6a5598aa8bb67 to your computer and use it in GitHub Desktop.
#FunWithLinux #Find #Linux #FileSystem
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Today I was just curious which directory holds the deepest file on my Linux PC. | |
The below command will print the dir with maximum depth. | |
>find / -type d | awk -F "/" -v slash=0 '{if (NF > slash) { slash=NF; DIR=$0}} END { print DIR":"slash}' | |
The result I got is 16 as max depth which was a ruby dir. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment