Discover Centmin Mod today
Register Now

Command not running on script

Discussion in 'System Administration' started by pamamolf, Jul 8, 2014.

  1. pamamolf

    pamamolf Premium Member Premium Member

    3,947
    400
    83
    May 31, 2014
    Ratings:
    +779
    Local Time:
    8:07 PM
    Nginx-1.17.x
    MariaDB 10.3.x
    Hi

    I am testing a script.sh and i can't get this work:

    #!/bin/bash
    # Compress them
    /bin/tar -zcf /home/backup/file.txt

    file /home/backup/file.txt exist and the cron is running as i can check using tailf /var/log/cron

    Why is not running?

    I was try also as
    tar -zcf /home/backup/file.txt


    Thanks
     
  2. eva2000

    eva2000 Administrator Staff Member

    47,294
    10,703
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +16,628
    Local Time:
    3:07 AM
    Nginx 1.19.x
    MariaDB 5.5/10.x
  3. pamamolf

    pamamolf Premium Member Premium Member

    3,947
    400
    83
    May 31, 2014
    Ratings:
    +779
    Local Time:
    8:07 PM
    Nginx-1.17.x
    MariaDB 10.3.x
    ok found it thanks :)