Hoy os quiero presentar un pequeño programa, muy sencillo, pero a la vez muy útil, que presenta de forma gráfica (página web) los resultados de ocupación en disco con colores e indicando antigüedad de los ficheros. Se llama agedu.
agedu simplemente se dedica a escanear el disco en busca de los ficheros o lo que ocupa cada directorio, para finalmente guardar un informe final en un fichero que posteriormente podrá ser procesado y presentado. Para instalarlo, desde debian/ubuntu,
shell> apt-get install agedu
Tras la instalación, probamos a ejecutarlo, para ver las opciones y posibilidades que nos ofrece.
shell> agedu usage: agedu [options] action [action...] actions: -s,--scan directory scan and index a directory -w,--web serve HTML reports in a web server -t,--text subdir print a plain text report on a subdir -R,--remove remove the index file -D,--dump dump the index file on stdout -L,--load load and index a dump file -S,--scan-dump dir scan only, generating a dump -H,--html subdir print an HTML report on a subdirectory --cgi do the right thing when run from a CGI options: -f,--file filename [most modes] specify index file --cross-fs [--scan] cross filesystem boundaries --no-cross-fs [--scan] stick to one filesystem --prune wildcard [--scan] prune files matching pattern --prune-path wildcard [--scan] prune pathnames matching pattern --exclude wildcard [--scan] exclude files matching pattern --exclude-path wildcard [--scan] exclude pathnames matching pattern --include wildcard [--scan] include files matching pattern --include-path wildcard [--scan] include pathnames matching pattern --progress [--scan] report progress on stderr --no-progress [--scan] do not report progress --tty-progress [--scan] report progress if stderr is a tty --dir-atime [--scan,--load] keep real atimes on directories --no-dir-atime [--scan,--load] fake atimes on directories --mtime [--scan] use mtime instead of atime --files [--web,--html,--text] list individual files -r,--age-range age[-age] [--web,--html] set limits of colour coding -o,--output filename [--html] specify output file or directory name --address addr[:port] [--web] specify HTTP server address --auth type [--web] specify HTTP authentication method --auth-file filename [--web] read HTTP Basic user/pass from file --auth-fd fd [--web] read HTTP Basic user/pass from fd -d,--depth levels [--text,--html] recurse to this many levels -a,--age age [--text] include only files older than this also: -h,--help display this help text -V,--version report version number --licence display (MIT) licence text
Tras un vistazo rápido a las opciones, vemos que lo que nos interesa es realizar un escaneo del disco para que indexe la información que interesa, así que por lo tanto, lo ejecutamos con la opción -s y el directorio del que nos interese sacar información. En nuestro caso /, ya que queremos tener información de todo el disco.
shell> agedu -s /
Al finalizar nos habrá creado un fichero en el directorio donde se haya ejecutado, agedu.dat, que tendrá toda la información sobre el disco. EL fichero que genera es de tipo binario, por lo que es necesario recurrir nuevamente a agedu con la opción de montar un servidor web para poder visualizar los datos.
shell> agedu -w --auth none URL: http://127.0.0.1:58573/
Al acceder a esa dirección se podrá visualizar y navegar por los directorios, teniendo de forma 100% visual información del estado del disco.
No hay comentarios :
Publicar un comentario