We value your feedback.
Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!
#!/bin/tcsh ... echo "Enter Directory Name:" set mydir = $< echo "Calculating the total of the size of all files in the directory tree" echo "" set mysum = 0 #variable to hold sum set filelist = $mydir set mycursize = 0 #variable to hold current filesize echo $filelist foreach x ($filelist) @ mycursize = `stat -c%s $x` #finds current filesize echo "size of $x is $mycursize" @ mysum = $mysum + $mycursize #accumulator end echo "The sum of the size of all files in this directory is: $mysum" ...
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Join the community of 500,000 technology professionals and ask your questions.