Are you interested in becoming an AWS Certified Solutions Architect?
Discover a new interactive way of training for the exam.
#!/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.