in reply to FTP question
#!/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"; } }
|
|---|