gAMBOOKa Asked: 2010-05-19 23:50:39 +0800 CST2010-05-19 23:50:39 +0800 CST 2010-05-19 23:50:39 +0800 CST How to take snapshot of the filesystem in linux (files, their sizes only, not their data) 772 We need to take a snapshot of your linux server. We don't want to backup the data, just a snapshot we can compare against changes. backup linux snapshot 3 Answers Voted Best Answer ptman 2010-05-20T01:19:28+08:002010-05-20T01:19:28+08:00 find / -ls > fileinfo.txt But take a look at tripwire and aide, since that seems to be what you are aiming for anyway. Also note that rpm can check files against checksums and for debian based distributions there is debsums. cpbills 2010-05-20T00:08:31+08:002010-05-20T00:08:31+08:00 i would recommend checking for md5 sums of files, and not just file size. however: find / -printf "%h/%f %s\n" > /some/path/filesize would generate a list of files and their sizes. you could also do find / | xargs md5sum 2> /dev/null 1> /some/path/file-md5s to generate a list of filenames and their md5 sums. A.Rashad 2010-05-20T00:58:46+08:002010-05-20T00:58:46+08:00 use du <filesystem mount point> it should give you size and file in full location
But take a look at tripwire and aide, since that seems to be what you are aiming for anyway. Also note that rpm can check files against checksums and for debian based distributions there is debsums.
i would recommend checking for md5 sums of files, and not just file size. however:
find / -printf "%h/%f %s\n" > /some/path/filesize
would generate a list of files and their sizes.you could also do
find / | xargs md5sum 2> /dev/null 1> /some/path/file-md5s
to generate a list of filenames and their md5 sums.use
it should give you size and file in full location