Sponsored Content
Full Discussion: Can I view an 'at' command?
Top Forums UNIX for Dummies Questions & Answers Can I view an 'at' command? Post 302578775 by vbe on Friday 2nd of December 2011 09:36:13 AM
Old 12-02-2011
Something that might interest you:
Code:
ant:/home/vbe $ at -f /home/vbe/test_at_cmd now+7minutes
warning: commands will be executed using /usr/bin/sh
job 1322836280.a at Fri Dec  2 15:31:20 2011
ant:/home/vbe $ cd /var/spool/cron/atjobs
ant:/var/spool/cron/atjobs $ ll
total 12
-r-Sr-Sr--   1 vbe        bin           6029 Dec  2 15:24 1322836280.a
ant:/var/spool/cron/atjobs $ cd ..
ant:/var/spool/cron $ ll
total 4
-r-Sr-Sr--   1 vbe        bin              0 Dec  2 13:41 _at24347        # these are bad ones...and so dont  
-r-Sr-Sr--   1 vbe        bin              0 Dec  2 13:44 _at24391        # finish in atjobs it seems....
dr-xr-xr-x   2 bin        bin             96 Dec  2 15:24 atjobs
-r--r--r--   1 bin        bin            335 Nov 14  2000 crontab.root
dr-xr-xr-x   2 bin        bin           1024 May 31  2010 crontabs
drwxr-xr-x   2 root       sys             96 Jun 24  2009 save
drwxrwxrwt   2 root       root            96 Dec  2 15:25 tmp

--

ant:/home/vbe $ jobs
[2] + Stopped (tty input)      nohup at now+2minutes ./test_at_cmd&
[1] - Stopped (tty input)      at now+5minutes ./test_at_cmd&

ant:/var/spool/cron/atjobs $ more 1322836280.a
: at job
export LANG; LANG=C
export _; _=/usr/bin/at
export MANPATH; MANPATH=/usr/share/man/%L:/usr/share/man:/usr/contrib/man/%L:/us
r/contrib/man:/usr/local/man/%L:/usr/local/man:/opt/upgrade/share/man/%L:/opt/up
grade/share/man:/opt/pd/share/man/%L:/opt/pd/share/man:/opt/pd/share/man/%L:/opt
/pd/share/man:/opt/pd/share/man/%L:/opt/pd/share/man:/opt/ignite/share/man/%L:/o
pt/ignite/share/man:/opt/mx/share/man:/usr/dt/share/man:/opt/samba/man:/opt/perf
/man/%L:/opt/perf/man:/opt/OV/man/itose/%L:/opt/OV/man/itose:/opt/prm/man/%L:/op
etc...
export EDITOR; EDITOR=vi
export HISTFILE; HISTFILE=/home/vbe/.sh_history
export LOGNAME; LOGNAME=vbe
export MAIL; MAIL=/var/mail/vbe
export MOZILLA_HOME; MOZILLA_HOME=/opt/mozilla
export USER; USER=vbe
export XFORCE_INTERNET; XFORCE_INTERNET=True
export SHELL; SHELL=/usr/bin/ksh
export HISTSIZE; HISTSIZE=18432
export TMOUT; TMOUT=0
export HOME; HOME=/home/vbe
export A__z; A__z=-5TMOUT
# @(#)B.11.11_LR
cd /home/vbe
ulimit unlimited
umask 2
#!/usr/bin/ksh
HOME=/home/vbe

cd $HOME
echo "PWD "$PWD >$HOME/at_test.out
. $HOME/profile_cron
/usr/bin/touch $HOME/at_test.out
echo "Im " $(id) >&1
/usr/bin/umask >&1
/usr/bin/newgrp >&1
echo "Im " $(id) >&1

1322836280.a: END
----

ant:/var/spool/cron/atjobs $ date;ll
Fri Dec  2 15:31:54 MET 2011
total 0
ant:/home/vbe $ date;jobs
Fri Dec  2 15:32:21 MET 2011
[2] + Stopped (tty input)      nohup at now+2minutes ./test_at_cmd&
[1] - Stopped (tty input)      at now+5minutes ./test_at_cmd&

So it may be what you see are unsuccessful attempt at trying to use at...
Needs cleaning (and I have also now...)
In my case its simple:
Code:
ant:/home/vbe $ date;jobs
Fri Dec  2 15:32:21 MET 2011
[2] + Stopped (tty input)      nohup at now+2minutes ./test_at_cmd&
[1] - Stopped (tty input)      at now+5minutes ./test_at_cmd&
ant:/home/vbe $ fg
nohup at now+2minutes ./test_at_cmd
                                                                    # Did a Ctrl-c
you have mail in /var/mail/vbe
ant:/home/vbe $ jobs
[1] + Stopped (tty input)      at now+5minutes ./test_at_cmd&
ant:/home/vbe $ fg
at now+5minutes ./test_at_cmd
                                                                   # Did a Ctrl-c
ant:/home/vbe $ jobs
ant:/home/vbe $


Last edited by vbe; 12-02-2011 at 10:49 AM.. Reason: Cant get rid of vi mania... Why is this editor not vi anyway?
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

view page command?

Hi All, When I run a command on any shell, many times the output is longer than the screen can hold, so I only can see parts of the output. Is there a command that will show me page by page the results of each command? Thanks, Jared (3 Replies)
Discussion started by: JaredsNew
3 Replies

2. UNIX for Dummies Questions & Answers

command to view ports being used

Is there a command that will show me all ports being used? I thought maybe the "lsof" command would show me, but I'm not seeing anything. Thanks, Jeff (2 Replies)
Discussion started by: lawadm1
2 Replies

3. HP-UX

View command was typed

Hello All, I Am A New Member To This Group. Could you show me how to view all command was typed the same Redhat. Every I type arrow up and down to show the command was type but nothing to see. I must type it again. it is very slow. Thanks hoavn (4 Replies)
Discussion started by: hoavn
4 Replies

4. Solaris

command to view the haware detail

I use command #lscfg -v in AIX system and it gives the detail of the hardware of the system. what is the similar command to view the detail of the hardware of the system in SUN-Solaris (3 Replies)
Discussion started by: pchangba1
3 Replies

5. Shell Programming and Scripting

Command to view folder subfolder and its capacity

Can any one tell how to view folder and subfolder with its capacity df -k will cannot be used it shows only the parent folder while du -k will show all subfolder and files but not show the capacity and also i dont want view any files Thank you!!!! (1 Reply)
Discussion started by: shivu
1 Replies

6. Shell Programming and Scripting

Command to view files in Directory

Hi, Can you help me in providing me a command to view all files present in a directory. Thanks a lot. -Vamsi (1 Reply)
Discussion started by: VamsiVasili
1 Replies

7. Shell Programming and Scripting

Command to view files in Directory

Hi, Can u provide me the command to view files in a directory.Urgent Pls. -Vamsi (4 Replies)
Discussion started by: VamsiVasili
4 Replies

8. AIX

Help Please - Command to view missing filesets in aix

Please anyone tell me "What is the command to view missing filesets in aix" Thanks in advance ---------- Post updated at 09:34 PM ---------- Previous update was at 05:09 PM ---------- Please anyone tell me "What is the command to view missing filesets in aix" Thanks in advance (3 Replies)
Discussion started by: sweetysiva29
3 Replies

9. Shell Programming and Scripting

Need to view command in history for specific date

hi i want to find a command in history for specific date . is it possible that i can view ?? (1 Reply)
Discussion started by: scriptor
1 Replies

10. SCO

Command to View Processor Usage

Hi everyone, i used to know the command to show current CPU usage but i cannot remember it. It was not "Top". Openserver 6. (4 Replies)
Discussion started by: Paulbas
4 Replies
All times are GMT -4. The time now is 09:49 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy