You are not logged in.
Hello I want to periodically backup the folder structure of my hard disk. My needs:
- I'd like to use a fast and light process to generate the text file
- I'd like to sort folders at the beginning
- I'd like to use different colors (or a good "tree"formatting too) for files and folders in order to be easy to read (I've a lot of hdd with a lot of folders/subfolders/files).
optional: if I can get expandable folder in an html file, it should be very useful in order to expand/reduce the structure
I used the following script but it's slow and not so well formatted (not easy to read). Do you know a better way to do it?
DATETIME=$(date +"[%d-%b-%Y][%H.%M.%S]")
mkdir -p "$OUTPUT/$DATETIME"
tree -H baseHREF --nolinks -C -D --dirsfirst -h "/root/to/scan" > "$OUTPUT/$DATETIME/FolderStrucuture.html"
Last edited by pepper (2021-12-23 09:11:41)
Offline
Not used but linuxdir2html seems to fit the job: https://github.com/homeisfar/LinuxDir2HTML
--
saint_abroad
Offline