Search Results

Search: Posts Made By: cergun
10,356
Posted By cergun
As I am throwing these to excel, I decided to put...
As I am throwing these to excel, I decided to put the size in the beginning so I seperate columns with "/". Therefore the change of number of columns in each line does not cause any problems with the...
10,356
Posted By cergun
final code is: for dirname in `du...
final code is:


for dirname in `du /DirectoryPath/ | awk '{ print $NF }' `;
do
echo -n $dirname
ls -l $dirname/*.dta 2>/dev/null | awk '{c+=$5} END {printf " %20.0f \n", c}';
done

I used...
10,356
Posted By cergun
it says: find: invalid argument `dir' to...
it says:

find: invalid argument `dir' to `-type'

How can I write the dirname and total size in one line instead of 2 lines?

---------- Post updated at 01:17 AM ---------- Previous update was...
10,356
Posted By cergun
amitranjansahu unfortunately this did not work...
amitranjansahu unfortunately this did not work either it listed a b c but not d

---------- Post updated at 12:44 AM ---------- Previous update was at 12:26 AM ----------

However it is about to...
10,356
Posted By cergun
amitranjansahu thank you for your answer but it...
amitranjansahu thank you for your answer but it did not work.

There are directories under the starting search directory.

I need the total size of dta files for each sub directory separately.
...
10,356
Posted By cergun
Getting the total file size for certain files per directory
Hi,

I am trying to get the total file size for certain files per directory.

I am using

find /DirectoryPath -name '*.dta' -exec ls -l {} \; | awk '{ print $NF ": " $5 }' >...
Showing results 1 to 6 of 6

 
All times are GMT -4. The time now is 09:27 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy