Guest User

Untitled

a guest
Mar 6th, 2018
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. dir_count=$(find . -type d |wc -l)
  4. echo "Directories: $dir_count"
  5.  
  6. file_count=$(find . -type f |wc -l)
  7. echo "Regular Files: $file_count"
  8.  
  9. ln_count=$(find . -type l |wc -l)
  10. echo "Symbolic Links: $ln_count"
  11.  
  12. bl_count=$(find . -type b |wc -l)
  13. echo "Block Devices: $bl_count"
  14.  
  15. chr_count=$(find . -type c |wc -l)
  16. echo "Character Devices: $chr_count"
  17.  
  18. fifo_count=$(find . -type p |wc -l)
  19. echo "Named Pipes: $fifo_count"
  20.  
  21. sock_count=$(find . -type s |wc -l)
  22. echo "Sockets: $sock_count"
Add Comment
Please, Sign In to add comment