Hi! I ran into a problem with a job I'm running. All it is doing is a "touch" on a filename. However, when I ran the job, it error'd out and got the message 'cannot stat'. When I restarted the job (making no changes) it worked just fine. Anyone know what this means? (1 Reply)
I'm not sure where to post this so I'll try it here.
I'm trying to load a software package to my server and I keep getting a cannot stat error. I'll post the error line below along with my configuartaion line. Can anyone help or point me in the right direction. Thanks!
This is the error.
... (1 Reply)
From reading various articles on the net, I know stat() is used on files to get things like permissions, sizes etc... As a folder is a special type of file in Unix, I assumed that stat() could work on it as well as any general file.
However, from running my program, perror() reported that the... (3 Replies)
I'm trying to find .tif files in a directory tree and rename them prior to zipping them and moving them to another dir. this is my code:
cd $TMPPATH
pwd
ctr=0
for i in 'find . -name "*.tif"'
do
let "ctr+=1"
newtifname=$DATEDIR"_"$SEQ"_"$ctr".tif"
mv "$i"... (6 Replies)
I have a string with escape differentiators as a result of searching for a file using find. Essentially find returned to my shell variable several absolute paths each ending with the file name and each path/file separated by \n.
Echo recognizes the escape sequence and is able to print the paths... (3 Replies)
If i do ls -l i get the result rwx-rw-r ...... ............... file.
How can i get the result in octal format.
All other output will be the same as ls -l shows.
The rwx-rw-r would be like 755 etc. (7 Replies)
i know this command does not exist in solaris. however, i read somewhere on this forum that basically everything the stat command provides in other oses can be obtained in solaris using the ls command.
i've searched the forum for a while now and i cant find the thread. does anyone know about... (1 Reply)
Die to what all operations, the "Modify" and "Change" values of stat output changes for a file.
I found, during editing a file, Change and Modify alters. When chmod'ing Change alters, while Modify doesnot alters. Is there more situations where these changes? (1 Reply)
Hi All,
I am getting the below error can anyone please help with this?
cp ${AI_SERIAL}/file_name ${AI_SERIAL_ARCH}/${ODATE}_file_name
cp: cannot stat `$AI_SERIAL/FILE_NAME': No such file or directory
+ gzip:$AI_SERIAL_ARCH./$ODATE_FILE_NAME
gzip:$AI_SERIAL_ARCH./$ODATE_FILE_NAME: No such... (2 Replies)
Discussion started by: bhanudhingra
2 Replies
LEARN ABOUT REDHAT
file::stat
File::stat(3pm) Perl Programmers Reference Guide File::stat(3pm)NAME
File::stat - by-name interface to Perl's built-in stat() functions
SYNOPSIS
use File::stat;
$st = stat($file) or die "No $file: $!";
if ( ($st->mode & 0111) && $st->nlink > 1) ) {
print "$file is executable with lotsa links
";
}
use File::stat qw(:FIELDS);
stat($file) or die "No $file: $!";
if ( ($st_mode & 0111) && $st_nlink > 1) ) {
print "$file is executable with lotsa links
";
}
DESCRIPTION
This module's default exports override the core stat() and lstat() functions, replacing them with versions that return "File::stat"
objects. This object has methods that return the similarly named structure field name from the stat(2) function; namely, dev, ino, mode,
nlink, uid, gid, rdev, size, atime, mtime, ctime, blksize, and blocks.
You may also import all the structure fields directly into your namespace as regular variables using the :FIELDS import tag. (Note that
this still overrides your stat() and lstat() functions.) Access these fields as variables named with a preceding "st_" in front their
method names. Thus, "$stat_obj->dev()" corresponds to $st_dev if you import the fields.
To access this functionality without the core overrides, pass the "use" an empty import list, and then access function functions with their
full qualified names. On the other hand, the built-ins are still available via the "CORE::" pseudo-package.
BUGS
As of Perl 5.8.0 after using this module you cannot use the implicit $_ or the special filehandle "_" with stat() or lstat(), trying to do
so leads into strange errors. The workaround is for $_ to be explicit
my $stat_obj = stat $_;
and for "_" to explicitly populate the object using the unexported and undocumented populate() function with CORE::stat():
my $stat_obj = File::stat::populate(CORE::stat(_));
NOTE
While this class is currently implemented using the Class::Struct module to build a struct-like class, you shouldn't rely upon this.
AUTHOR
Tom Christiansen
perl v5.8.0 2002-06-01 File::stat(3pm)