Hello, just wondering if this can be done as I'd like to use it in a script.
I want to take this:
Code:
root@ubox:~$ du /etc
80 /etc/laptop-mode/conf.d
4 /etc/laptop-mode/lm-ac-start
4 /etc/laptop-mode/lm-ac-stop
4 /etc/laptop-mode/nolm-ac-start
4 /etc/laptop-mode/batt-start
4 /etc/laptop-mode/nolm-ac-stop
124 /etc/laptop-mode
16 /etc/defoma/config
160 /etc/defoma/hints
204 /etc/defoma
8 /etc/firefox-3.5/pref
12 /etc/firefox-3.5/profile/chrome
48 /etc/firefox-3.5/profile
60 /etc/firefox-3.5
8 /etc/byobu
4 /etc/opt
68 /etc/speech-dispatcher/modules
12 /etc/speech-dispatcher/clients
96 /etc/speech-dispatcher
8 /etc/xulrunner-1.9.1
And just keep the file sizes at the very beginning, no spaces, no letters, nothing after the first series of numbers. Then I want to output those to a file to be added together later. I can handle the addition part, but awk confuses me
If it has any bearing, the endgame here is to create a script that will count files and file sizes, add them together on a daily basis to come up with a total. We have a NAS for computer backups and I would like to be able to look at one line of text and see how much data and file count we've backed up from today.