Server :: Direct Cron Output In Text?
Apr 29, 2010
has no MTA (Postfix, Sendmail, Exim) installed so it can't email me the results of any cron job I schedule. I would then like to have the results from Cron be dumped into a small text file so I can read it later to view any issues.Right now my job is as follows:Code:01 18 * * * /usr/bin/shellscript.shAbove you see my script I want to run every day @ 6:01 pm. My question is what would the cron line look like if I wanted the results dumped into a random text file somewhere on my system?
View 1 Replies
ADVERTISEMENT
Jan 29, 2011
I have added some executable scripts to /etc/cron.daily but don't get the stdout/stderr output from them as mail (or anywhere else I have found). At least one of them is running (because I can see that it has added a file to the disk).
The peculiar thing is that I do get the output from /etc/cron.daily/0logwatch (part of the logwatch package) as an email each day.
The MAILTO line in /etc/crontab is "MAILTO=root" (unchanged from default). Same for /etc/anacrontab.
I do have an alias at the end of /etc/aliases which redirects root's mail to my own account, but this alias works fine for mail I send manually. (It also appears to work fine for the output from the file /etc/cron.daily/0logwatch.)
View 3 Replies
View Related
Feb 27, 2011
I need to re-direct the output within an awk script, but not to already known, fixed filenames. The output file names depend on values of the fields. For example (the actual problem is surely more complicated), if, on a given line, the second field is DATA, the third is 1984, I would like to print some information in a file called output_DATA_1984. This could/would change in the following line of the same input file. Such things are pretty easy in bash, put I cannot do it in awk, as I can only find manual references for redirecting output to fixed filenames between double quotes.
View 2 Replies
View Related
Nov 15, 2010
I would like to plug my guitar on my pc and hear what I'm playing out of my headphones. I have not found out yet how I can enable direct output. Neither with Line-In, nor Mic-Input worked. Has anyone an idea how to enable it? KMix does not provide such a function as far as I know
View 7 Replies
View Related
Mar 26, 2010
I'm trying to pull out sections from a bunch of files. For one file, I use:
Code:
sed '/string1/,/string2/ !d' <filename.ext >newfilename.ext
to pull out everything between two strings in the original file and put them in a new file.
[code]....
View 3 Replies
View Related
Oct 22, 2015
How to change:
(1) My preferred File Management program, the one that kicks off when I use Places? and
(2) The amount of time before the display is put to sleep?
I DO NOT WANT TO USE A GUI FRONT END to do this. The reason is (1) my preferred File Manager, Xfe, is not listed as one of the options by Preferred Applications. And (2) Power Management Preferences allows 10 or 30 minutes before putting the display to sleep but I want 20 minutes. I need to know what files contain these configurations so I can edit them directly.
View 10 Replies
View Related
Jul 23, 2011
I use a text editor mostly for opening up and editing ascii text files that are used by the programs I write. For example, manually editing comma separated value data files.
I've been using Gedit for this, and it's been very frustrating because I started noticing new-line characters (hex 0A) were creeping into my CSV ascii data. It turns out that Gedit has an undocumented "feature" where it silently introduces a new line character at the end of any file you edit, and there is no way to turn this feature off! See this bug report. I installed GVim, and a quick test shows that GVim does the same thing.
I would like a recommendation for a more straightforward text editor, which:
1) Doesn't add extra bytes to the file (or if it does, this behavior can be turned off).
2) Allows you to force ASCII when opening a file (sometimes Gedit will make an incorrect assumption about encoding because of a stray non-printable character)
More advanced features would be nice, like regular expressions for search and replace, but I need this basic functionality first.
View 3 Replies
View Related
Feb 13, 2010
I am trying to find sed command combination to print out the "start command" line, the id line and all lines between "details" and "stop command" only if "error" exists. Here's the original output (test.txt):
start command
id 1
kajsdlfjsalj
[code]...
View 3 Replies
View Related
May 27, 2009
I' running awstats via
/etc/logrotate.d/httpd
prerotate
/usr/bin/awstats_updateall.pl -awstatsprog=/var/www/awstats/awstats.pl now
endscript
View 1 Replies
View Related
May 31, 2010
I have the following shell:
export PATH=/u01/app/oracle/product/10.2.0/db_2/bin:/usr/sbin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin
ftp -u -v -n -i > /bk01/exports/FTP_OUTPUT.LOG <<EOF
open 197.0.0.78
user orabackup orabackup
cd /media/disco/BK_Oracle
bin
put FILE00001.LOG
put FILE00001.DMP
quit
EOF
Executing the shell from command line, the output is:
Connected to 197.0.0.78.
220 Bienvenido al servicio FTP del servidor backup.
530 Please login with USER and PASS.
530 Please login with USER and PASS.
331 Please specify the password.
230 Login successful.
250 Directory successfully changed.
200 Switching to Binary mode.
local: EXPO_APOT10G_20100531.LOG remote: EXPO_APOT10G_20100531.LOG 227 Entering Passive Mode (197,0,0,78,200,162) 150 Ok to send data. 226 File receive OK. 127498 bytes sent in 0.0022 seconds (5.7e+04 Kbytes/s)
local: EXPO_APOT10G_20100531.DMP remote: EXPO_APOT10G_20100531.DMP
227 Entering Passive Mode (197,0,0,78,175,141) 150 Ok to send data. 226 File receive OK. 458190848 bytes sent in 6.1 seconds (7.3e+04 Kbytes/s)
221 Goodbye.
Executing the shell from cron, the output is:
Connected to 197.0.0.78 (197.0.0.7.
220 Bienvenido al servicio FTP del servidor backup.
331 Please specify the password.
230 Login successful.
250 Directory successfully changed.
200 Switching to Binary mode.
local: EXPO_APOT10G_20100531.LOG remote: EXPO_APOT10G_20100531.LOG
local: EXPO_APOT10G_20100531.DMP remote: EXPO_APOT10G_20100531.DMP
221 Goodbye.
Why from cron the output no show the statistics in red ...?
View 2 Replies
View Related
Sep 7, 2010
I am trying to display a text using crontab. My settings :
*/2 * * * * /bin/echo "hello"
This setting sends a mail to the user, instead of displaying on the screen. Now tried changing the setting to:
*/2 * * * * /bin/echo "hello" > /dev/tty1
Now I can see the text on the screen, but this setting comes with a catch. What would happen if the user changes the terminal. for instance if he gets into tty2, he wont have write access on tty1. So the user gets a mail saying "permission denied". Is there any way that I can force the user to use a particular terminal or can a cron job be set in a way such that the user would get the text irrespective of the terminal he logs in.
View 1 Replies
View Related
Oct 15, 2010
i got a bash script which can remind me my friends' birthday ,and i want run it as a cron job everyday,but the linux just emails me the output.Now my question is how to how to redirect the cron output to screen.
PS: when i run the script mannually ,it runs very well,so my script is good. And i have tried :
1.30 8 * * * root /home/birth.sh >/dev/console
it shows nothing
2. 30 8 * * * root /home/birth.sh >/dev/tty1
the same as 1
3. 30 8 * * * root /home/birth.sh >/dev/tty
it shows:/bin/sh: cannot create /dev/tty: No such device or address
View 5 Replies
View Related
Jan 29, 2011
why sadc (a front end for sar data collection) would append a "?" to the output file when run from cron? And more particularly, how should I correct it? I have a RHEL 5.4 system which is doing this.e.g./usr/lib64/sa/sadc -d 10 6 /tmp/test produces output file /tmp/test when run from the command line but when run from cron the file produced is called "/tmp/test?"
Normal system logging with sysstat, which uses the same sadc command (with a couple of other options, and none of the options -d, -F, -L affect this behaviour), produces output files /var/log/sa/sadd where "dd" is the day of the month. There does not seem to be any control over this within the sysstat start-up scripts, other than use of option "-" to generate standard output files, so I expect that the dd is being done within the code. Is this associated with the "?" ?.Whatever is going on, the appended query seems to get added to everything as it still happens if I make the output file /tmp/test_$(/bin/date +\%d).Is this a bug or am I missing something fundamental about cron?
View 1 Replies
View Related
Feb 6, 2011
im trying to output a list of running processes via a shell script. At the moment i got this which outputs the processes to a text file called out.
echo $(ps aux) >>out
The problem is though, the processes are all just one big block of text which makes it hard to read. Does anyone know how to sort the output to a text file so that it prints to the text file at 1 process per line? I know its probably simple but im very new to linux.
View 5 Replies
View Related
May 29, 2011
I have a test socket on a server. If I connect to it using telnet, I get exactly the response I expect. So I know the socket works, and the script on the server works:
Code:
my-desktop:~$ telnet 192.168.1.1 3333
Trying 192.168.1.1...
Connected to 192.168.1.1.
Escape character is '^]'.
RAM: 90 % Free ( 2793 M free, 3082 M total)
Connection closed by foreign host. And if I script it, I get almost the same response from Telnet, but still a valid response from the socket. So I know that my script works:
[Code].....
View 2 Replies
View Related
Jan 17, 2010
I've looked at tutorials but can't find out how to save a cron job in nano text editor.
I open crontab with
Quote:
crontab -e
The cron job I want to save is
Quote:
wget --output-document=dwr_$(date +\%Y\%m\%d\%H\%M).gif http://imd.gov.in/section/dwr/img/caz_chn.gif
So now I've got this in nano text editor
Quote:
# m h dom mon dow command
wget --output-document=dwr_$(date +\%Y\%m\%d\%H\%M).gif http://imd.gov.in/section/dwr/img/caz_chn.gif
What exactly do I do now to save the cron job? File doesn't have a Save As option,;just Open Terminal, Open Tab and New Profile.
View 9 Replies
View Related
Sep 5, 2011
Since we switched our server to Squeeze, I'm receiving emails from the cron about a mysql error (...can't use locks with log tables). But this is not the issue I want to talk about here. The issue is that since the executed command is: /usr/bin/mysqlcheck -uroot -pmypassword --all-databases --check-only-changed --silent which is a command that was automatically added to the cron by the mysql package (I believe), the password is sent in clear text in the email's subject. In my sense, this is a serious security issue (sending root password in email subject...)
I don't know at what level it should be corrected, but it seems to me like it should be corrected in the Debian distrib, shouldn't it ?
And for now, how can I hide the password in the emails I receive ?
View 1 Replies
View Related
Jun 22, 2010
how to mount ext3 file system with direct i/o.on AIX has dio mount option to use direct i/o and solaris too.
View 2 Replies
View Related
Jul 14, 2011
I was wondering if it is possible to append some text to the output of ls. Like say, if i wanted to create symbolic links for all the files under a folder in my hard disk to a folder on my desktop, I could say (Pretty sure this won't work, but I am looking forward to something like this) echo ln -s | ls . This should append ln -s to all the files of ls.
View 2 Replies
View Related
Feb 1, 2010
I need your help for a problem that it's happening in my customer. What I need is to change the configuration of a proxy, configured on Linux Cent OS v 4.3( explanation - see below) .My squid configuration's file it's like this:
[Code]...
View 3 Replies
View Related
Mar 17, 2011
Anyone know what version of spam assassin is newer 3.3.1-3 or 3.3.1-52 I would assume 52 is newer but I don't know if once it reaches 99 it going to 2 Example 3.3.1-99 ---- 3.3.1-2 -----3.3.1-21 and so on. I could be completely off but can anyone just clarify if 3.3.1-3 is newer or older than 3.3.1.52
(On a side note does anyone know the difference between spamassassin-3.3.1-3.el5.rfx.i386.rpm and spamassassin-3.3.1-3.el5.rf.i386.rpm?? What does the X mean?) I looked at the release date of .52 and it seems to be in march 2010 whereas .1-3 seems to be in november. oes that seem correct? Does anyone have a direct download to spamassassin-3.3.1-3el5.rf.i386.rpm???
View 6 Replies
View Related
Feb 15, 2011
I'd like to write a script that invokes a gnome-terminal session which slowly reads out text like the phosphor screensaver (could be anything, a log file, ascii art, song lyrics, whatev) and then closes. I can invoke a terminal using [gnome-terminal -e 'cat /var/log/dmesg'] but the output flies pass by too quickly.any way to slow it down? I know it seems like an odd request but if anyone has a suggestion I'd love to hear it.
View 3 Replies
View Related
Mar 3, 2011
I copied and pasted this from someones signature.d/__How did they write that horizontally mirrored 'd' at the end? How do I do that in Linux?
View 5 Replies
View Related
May 28, 2010
Using CentOS. I have a cron setup to run this command: Code: /var/test.sh | mail -s "Test Cron" mr182@somewhere.com The email is sent but the output of the script is not in the email body, it's just blank. I know there is some output because there are some echo statements in the script.I don't want to get an email for all cronjobs, just this one.
View 1 Replies
View Related
Jun 9, 2011
Is there a way to color particular words printed on console based on user preference? For example I need to color text 'error' when a particular program is compiled.
View 2 Replies
View Related
Mar 13, 2010
How can I record text to speech output from festival to an audio file like mp3 or ogg?
My guess would be to pipe it to a command line recorder
View 1 Replies
View Related
Apr 13, 2010
I'm having a slight dilemma on reading data from a text file and outputting it into a table then displaying it. Basically I'm writing a shell script that takes information from text files then outputs the data into a table with 4 headings. The extracting of the data is fine, but creating a table i'm having problems with. My code extracts the data outputs the string to another file which works fineThe text file looks like this
mr smith 1 purchase oct 2007
mrs smith 2 purchase nov 2006
i want it to look like this
[code]....
View 7 Replies
View Related
Mar 4, 2010
it compares two files using md5... if they are same , a corresponding character is output to a text file .. but the problem is it gets appended by default.. is there any way to output in a normal way because the text is a message and it should be of proper format
here is my script
Code:
#!/bin/bash
g=`tail -1 new.txt|head -n 1`
array=( a b c d e f g h i j k l m n o p q r s t u v w x y z )
for((i=1 ; i <$g+1 ; i++))
[code]....
the message is supposed to be hello , i need to get rid of the endlines somehow..
View 2 Replies
View Related
Dec 18, 2010
I am looking for a prgramme that output the lyrics when I give it an mp3...
Code:
fetchlyrics mymp3.mp3
based on its data inside of mp3
View 7 Replies
View Related
Feb 18, 2009
I seem to be having a strange problem configuring Piranha to load balance (Direct route) 2 ports across 2 w2k3 servers in a test environment. What is strange is that 1 of the ports are working fine but the other port doesn't work. I've read many how-to and after many frustrating hours I disabled the firewall, iptables and arptables services and one of the ports are load balanced across the 2 real servers. Here's the environment.
[Code]....
I can telnet from the client to the realserves on both ports and it's works. When I telnet to the VIP only one port gets through and the other gives me "could not open connection to host port 32777 : connect failed. The configuration in Piranha for one port is the same as the other. I can't help but think that some other configuration for port 32777 was missed.
View 1 Replies
View Related