11

Get Permissions and save to data

view full story
linux-howto

http://www.unix.com – Hi all; I have the following code which gives me kind of what I need: #!/usr/bin/perluse Fcntl ':mode';#if ($ARGV[0] ne "") { $filename = $ARGV[0];} else { print "Please specify a file!\n"; exit;}#if (($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime,$blksize,$blocks) = lstat($filename)) { $user = getpwuid($uid); $group = getgrgid($gid);# $ftypes[S_IFDIR] = "d"; $ftypes[S_IFCHR] = "c"; $ftypes[S_IFBLK] = "b"; $ftypes[S_IFREG] = "-"; $ftypes[S_IF (HowTos)