unix job control

Trying to find what command in unix we can fins the completed jobs for example a week before or all jobs completed week before.

1) Job history which is already completed. Not with logs or autosys/cron logs.
Unix system command or syatem logs of job history which already completed?

2) FTP jobs currently running ; other than ps -ef | grep ftp?
Who is Participating?
1) No way with pure Unix. Consider enabling system and process accounting. Here is more:


2) Try last ftp

Running sessions will show up as "Still logged in"


System accounting will help here too (for completed jobs).


Woolmilkpork is quite correct... But cron jobs/at-jobs do leave another mark, provided they actually have output... It'll be sent as an email to the user who scheduled the job.
But job history, sort of... Nope.

-- Glenn
ftpwho command may be available (it exists in proftpd, at least)
job control is something else from what you are asking for.

in UNIX job control is shell facility like using &, running fg or bg commands, ^Z etc - i.e running background jobs under control of shell.
on a mainframe it is something else, better known as spool in UNIX

To have proper control of "jobs" you need to maintain your own logging.
I.e when job starts you call
logger "!JOB!START! of type $* running as a PID $?"

when it ends
logger "!JOB!SUCCESS! ...

or it fails


1) depends of your definition of what a "JOB" is.

I would propose to finally enable process accounting ("man accton" on your system, or give us uname -a to figure out)

2) a drop of sarcasm

ps auxwww | grep ftp
ig it happens to be Linux "ps -C ftp"
PS in 99% of FTP ssenarios rsync or rbackup are better and safer options.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.