![]() |
Using awk to grab first number series
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 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. |
If you want a total number for a specific directory like /etc...
Code:
du -s /etc You could also use cut to grab just the numbers... Code:
du /etc | cut -f1 |
All times are GMT -5. The time now is 07:08 AM. |