Currently in our company we have a server linux
in which different folders are created daily and we need you to save only the structure of the folders without the information.
Currently in our company we have a server linux
in which different folders are created daily and we need you to save only the structure of the folders without the information.
With a program (convenient option)
You install tree
( apt-get install tree
in case it is a system that manages dpkg).
You execute tree -da /home/hamza/directorio-master > tuarchivo.txt
, changing /home/hamza/directorio-master
for your directory (the one you want to analyze and see what sub-directories it has), you also change tuarchivo.txt
for the file in which you want to save the result.
Options:
-d
= just list the directories
-a
= list the hidden directories (or files)
Without a program (efficient option)
You execute find /home/hamza/directorio-master type -d > tuarchivo.txt
, changing /home/hamza/directorio-master
for your directory (the one you want to analyze and see what sub-directories it has), you also change tuarchivo.txt
for the file in which you want to save the result.
Options:
-d
= just search the directories