Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I’m trying to run the following command

rsync -avz /mnt/backups/`date \
    --date=yesterday +\%Y-\%m-\%d`-`date \
    --date=yesterday +\%A`/server1/ /mnt/backups/`date \
        +\%Y-\%m-\%d`-`date +\%A`/server1/

The problem is I don't know how to change this from Ubuntu syntax to solaris which I have been asked to write a rsync script for. It doesn't like the date --date=yesterday +\%Y-\%m-\%d-date --date=yesterday +\%Apart. How would I write this part of the code so solaris understand it, I have had a read of the man page but couldn't get it to work

share|improve this question
up vote 0 down vote accepted

Solaris has some old and crispy userland. It has no options for changing date while formatting.

However you can switch to GNU tools:

share|improve this answer
no luck, thanks though – Paperghost Jun 15 '12 at 9:45
Can you name your solaris then? Solaris 8 has no such possibilities at all: – kworr Jun 15 '12 at 9:55
Solaris 11, i know but i thought solaris 11 might do – Paperghost Jun 15 '12 at 10:17
You have no luck with this one. – kworr Jun 15 '12 at 13:39
the tools come with solaris 11, don't think im going to have much luck with this one – Paperghost Jun 15 '12 at 14:17

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.