Re: Check directory

From: Andreas Kahari (ak+usenet_at_freeshell.org)
Date: 09/28/03


Date: Sun, 28 Sep 2003 15:39:53 +0000 (UTC)

In article <3F76D6FC.C0E0EB07@lido.net>, Lars Rhensius wrote:
> Hi,
> I want to check a directory on a 2nd server:
>
> ssh -l $USER $SERVER 'size=\`df ${BASEDIR} | grep domnotam | \`echo
> "awk '{print $5}'"``'
>
> but I only received error messages like: bash: `echo: command not found

Don't try to do everything remotely:

size=$(ssh -l $USER $SERVER df ${BASEDIR} | grep domnotam | awk '{print $5}')

BTW, isn't the fifth field of the ouput from df the capacity,
not the size?

-- 
Andreas Kähäri


Relevant Pages

  • Re: Lenny Henrys Head next on the block]
    ... text only server that doesn't give you every article in a text group ... Funny how a screen dump of that file shows a JFIF ... BTW, what's this: http://i2.tinypic.com/rgwitg.gif ... Frootbat is a moron. ...
    (uk.media.tv.misc)
  • Re: mp3 abspielen?
    ... Christine Bona schrieb: ... BTW Hältst du den Server für besser als gwdg? ... Im Browser fällt für meine 9.3 beim Vergleich der ...
    (de.comp.os.unix.apps.kde)
  • Re: mp3 abspielen?
    ... Dieter Intas schrieb am Donnerstag, ... BTW Hältst du den Server für besser als gwdg? ... Im Browser fällt für meine 9.3 beim Vergleich der beiden ...
    (de.comp.os.unix.apps.kde)
  • Re: installing fedora iso
    ... It worked for me in XP Pro. ... it doesn't work with XP SP2 or Win Server 03. ...
    (Fedora)
  • Re: Singleton Objects Dying
    ... > clearThreadPool() function which i was told to try but did not fix the ... investigating your server code, you will not find the answer. ... Btw, this ...
    (microsoft.public.dotnet.framework.remoting)