08-24-2015
man crontab:
Quote:
day of week 0-7 (0 or 7 is Sun, or use names)
, so either should do.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I want to change the IPsetting and the broadcast setting.
With ipconfig I get this:
hme0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
inet xx.17x.18x.xx netmask fffffff0 broadcast xx.17x.18x.xx
ether yy:0:yy:b6:yy:xx
What command(squence) do I use to... (6 Replies)
Discussion started by: kuultak
6 Replies
2. Shell Programming and Scripting
Hey all, I would like to know how to set a cron job to run from 8:15 am to 4:00 pm? Or do I have to do this in 2 seperates cron? Thanks! (4 Replies)
Discussion started by: mpang_
4 Replies
3. Linux
OK I have been working on this simple action for a while and I cannot get it to work.
First off im new to the linux command line world. I feel like I am missing something simple.
What I am trying to achieve is that I want this command:
tcpdump -s2000 -w'flowroute-%H%M.pcap' -G900 -W36 &to... (13 Replies)
Discussion started by: Nasasdge
13 Replies
4. Shell Programming and Scripting
Hi All,
I have created crontab using following steps-
1) crontab -e
(edited the file with) 0 10 * * 1-5 /home/user01/exercise/cron.sh
2) then saved this file with :wq
3) cron.sh contains the code-
#!/bin/bash
DAY=`date +%a`
mkdir abc_${DAY}
4) done the execut permision... (3 Replies)
Discussion started by: pspriyanka
3 Replies
5. Solaris
Hi,
0 9 1,2,3,4,5,6,7 3,4 6
I want a cronjob to run on every 1st Sat of Mar & Apr. But the above schedule is running is running on the 1st 7 days. How do i rectify it?
Thanks in advance. (2 Replies)
Discussion started by: beginningDBA
2 Replies
6. UNIX for Dummies Questions & Answers
I have set PSI for my prompt using the following command:
PS1="${debian_chroot:+($debian_chroot)}\\u@\h:\\\w\a]\ "which produces
chrisd@pguk:~]I want to include [ in the beginning but cannot understand the way to do this.
Also I want to show only the current directory, not the whole... (4 Replies)
Discussion started by: kristinu
4 Replies
7. Solaris
Hi, i wanted to schedule a backup script to run on 7.30pm every 1st Sat of month MAR, APR, SEP, OCT.
Am i understanding it correctly? Because it doesn't seem to run according to the schedule i needed.
= (7.30pm) & (1st to 7th day of the month) & (MAR, APR, SEP, OCT) & (Sat)
30 19 1-7... (1 Reply)
Discussion started by: beginningDBA
1 Replies
8. Solaris
Trying to figure out the best method of security for oracle user accounts. In Solaris 10 they are set as regular users but have nologin set forcing the dev's to login as themselves and then su to the oracle users.
In Solaris11 we have the option of making it a role because RBAC is enabled but... (1 Reply)
Discussion started by: os2mac
1 Replies
9. UNIX for Dummies Questions & Answers
Hi Team,
Please help me to set one script in crontab.
I have one script and inside script, its creating one log file for saving ouptut of script. i have to out that script in crontab. When i put the script in cronatab, it executed and log file created but no data in log.
like this i put in... (3 Replies)
Discussion started by: shivshankar
3 Replies
10. Linux
Dear All,
I have Google Two Factor (2F) Authentication enabled for sshd on most of my Linux servers. This works well and I highly recommend it.
My question is:
Has anyone set this up for rsync which runs in a crontab?
For example, supposed we have this simple crontab script:
... (5 Replies)
Discussion started by: Neo
5 Replies
LEARN ABOUT DEBIAN
shell-quote
SHELL-QUOTE(1p) User Contributed Perl Documentation SHELL-QUOTE(1p)
NAME
shell-quote - quote arguments for safe use, unmodified in a shell command
SYNOPSIS
shell-quote [switch]... arg...
DESCRIPTION
shell-quote lets you pass arbitrary strings through the shell so that they won't be changed by the shell. This lets you process commands
or files with embedded white space or shell globbing characters safely. Here are a few examples.
EXAMPLES
ssh preserving args
When running a remote command with ssh, ssh doesn't preserve the separate arguments it receives. It just joins them with spaces and
passes them to "$SHELL -c". This doesn't work as intended:
ssh host touch 'hi there' # fails
It creates 2 files, hi and there. Instead, do this:
cmd=`shell-quote touch 'hi there'`
ssh host "$cmd"
This gives you just 1 file, hi there.
process find output
It's not ordinarily possible to process an arbitrary list of files output by find with a shell script. Anything you put in $IFS to
split up the output could legitimately be in a file's name. Here's how you can do it using shell-quote:
eval set -- `find -type f -print0 | xargs -0 shell-quote --`
debug shell scripts
shell-quote is better than echo for debugging shell scripts.
debug() {
[ -z "$debug" ] || shell-quote "debug:" "$@"
}
With echo you can't tell the difference between "debug 'foo bar'" and "debug foo bar", but with shell-quote you can.
save a command for later
shell-quote can be used to build up a shell command to run later. Say you want the user to be able to give you switches for a command
you're going to run. If you don't want the switches to be re-evaluated by the shell (which is usually a good idea, else there are
things the user can't pass through), you can do something like this:
user_switches=
while [ $# != 0 ]
do
case x$1 in
x--pass-through)
[ $# -gt 1 ] || die "need an argument for $1"
user_switches="$user_switches "`shell-quote -- "$2"`
shift;;
# process other switches
esac
shift
done
# later
eval "shell-quote some-command $user_switches my args"
OPTIONS
--debug
Turn debugging on.
--help
Show the usage message and die.
--version
Show the version number and exit.
AVAILABILITY
The code is licensed under the GNU GPL. Check http://www.argon.org/~roderick/ or CPAN for updated versions.
AUTHOR
Roderick Schertler <roderick@argon.org>
perl v5.8.4 2005-05-03 SHELL-QUOTE(1p)