Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Unix Finger access

Status
Not open for further replies.

unixadmin

MIS
Jan 27, 2003
11
US

I need to find out the last time the "finger" command was done on our account in my home directory.

This is on a Solaris 7 system and will help us to find out recent "finger" commands.
 
I would use stat. Each time you are fingered the .plan file in your home directory is accessed. Try this:

[tt]
#!/usr/local/bin/perl
$file = "./";

opendir(HOME,$file) || die "Could not open: $!\n";
@files = readdir(HOME);
close(HOME);

for(@files) {
if ($_ =~ m/\.plan$/) {
$mod = localtime ( (stat($_))[8]);
print "$_ last accessed: $mod\n";
}[/tt]
}
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top