in reply to FTP question

Here's something basic that should work. It will save the output of a ps -ef command to a file then use a regex to search if ftpd is running.
#!/usr/bin/perl -w use strict; # See if ftp is running my $result; my $file = "/tmp/df"; my $cmd1 = "ps -ef"; # Run the ps -ef command $result = `$cmd1 >$file`; # Open the file and search if the daemon is running open (FILE, $file) or die "can't open $file: $!"; while (<FILE>){ if (/ftpd/){ print "The ftp daemon is running\n"; } }

HTP
-Dru
Another satisfied monk.