The UNIX and Linux Forums
>
Top Forums
>
Shell Programming and Scripting
Directory sizes loop optimization
.
User Name
Remember Me?
Password
google unix.com
Forums
Register
Forum Rules
Links
Albums
FAQ
Members List
Calendar
Search
Today's Posts
Mark Forums Read
Thread
:
Directory sizes loop optimization
View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
#
5
(
permalink
)
05-16-2008
shamrock
Registered User
Join Date: Oct 2007
Location: USA
Posts: 750
Put it in double-quotes and use $(cmd) instead of `cmd` which makes it much easier to follow.
Code:
SIZE=$(/usr/bin/ssh -q $ID@$SERVER "find $DIRECTORY -type d -exec du -sk {} \;")
shamrock
View Public Profile
Find all posts by shamrock
Find shamrock's past nominations received
Find shamrock's present nominations given