03-01-2012
Thanks tukuyomi,
i tried and get this error on hp-ux 11.11 box
cm.sh[3]: stat: not found.
cm.sh[3]: test: Specify a parameter with this command.
We don't have stat,fstat or lstat available !!!
Thanks,
-srinivas
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi, I am i new Unix linux user. I've installed the linux 9 and i uninstall it. the first time i install the linux, the GRUB show the graphical interface. But after i reinstall it again, the GRUB change to command line. I can't boot my comp now. What should I do? And i don't know how to deal with... (1 Reply)
Discussion started by: lee_chongeu
1 Replies
2. Linux
Hi, I am i new Unix linux user. I've installed the linux 9 and i uninstall it. the first time i install the linux, the GRUB show the graphical interface. But after i reinstall it again, the GRUB change to command line. I can't boot my comp now. What should I do? And i don't know how to deal with... (4 Replies)
Discussion started by: lee_chongeu
4 Replies
3. UNIX for Dummies Questions & Answers
How do I change IP addresses in command mode? i need to assign custom (non DHCP) addresses from the command line. Actually I also need to know how to change the subnet mask, the gateway and the primary, secondary, ... dns servers. (6 Replies)
Discussion started by: Super.Anyak
6 Replies
4. UNIX for Dummies Questions & Answers
Hi,
When working in vi, the CTRL+j command for merging lines is very convenient. Is there an equivalent for splitting them (inserting a line break)? I often find myself pressing "i" + "return" + "esc", which I find a bit lengthy.
Thanks in advance! (3 Replies)
Discussion started by: Skogsmulle
3 Replies
5. UNIX for Advanced & Expert Users
Hi,
I'm trying to execute my program from $prompt by passing many parameters which is more than 300 charecters in line but unix not accepting those many charecters, could some one help me how to increase the size?
thanks (7 Replies)
Discussion started by: krishna
7 Replies
6. Shell Programming and Scripting
I am looking to change a data file into a javascript string and this is the code that I am using:
sed -i '' -e 's/^/str += "/' -e 's/$/";/' file.xml
The first part
-e 's/^/str += "/'
works as intended, but the second part
-e 's/$/";/'
adds an additional newline to my file, so that instead of... (3 Replies)
Discussion started by: figaro
3 Replies
7. Shell Programming and Scripting
I want to change the extensions of a folder full of files (some of the files are located in subfolders as well) to another extension, but instead of replacing the files I want the new files to be copied into a newly created folder.
Here is the folder structure:
/Downloads/3eb... (3 Replies)
Discussion started by: bound4h
3 Replies
8. UNIX for Advanced & Expert Users
Hi All,
Can please let me know what is the difference between the single line mode and multi line mode in regular expresions?
Thanks,
Chidhambaram B (3 Replies)
Discussion started by: chidhu.anu
3 Replies
9. UNIX for Dummies Questions & Answers
Hello,
I am using RHEL 6.1 on VMware
I am searching for a way to change background color (not line by line color wich one can using tput command)
basically changing the color of the whole screen to white instead of the default black and changing font color to black and alos would like to... (2 Replies)
Discussion started by: Dexobox
2 Replies
10. Red Hat
Hi All,
Please let me know that how to start Fedora 11 in command line mode and skip damaged programs ??
Scenario being:
I have Fedora 11 ( pretty ole... eh !! ). If I try to start the PC , then after some steps of startup... it just hangs and does not boots. I tried entering the mode... (4 Replies)
Discussion started by: dipanchandra
4 Replies
STAT(2) System Calls Manual STAT(2)
NAME
stat, fstat - get file status
SYNOPSIS
#include <sys/types.h>
#include <sys/stat.h>
stat(name, buf)
char *name;
struct stat *buf;
fstat(fildes, buf)
struct stat *buf;
DESCRIPTION
Stat obtains detailed information about a named file. Fstat obtains the same information about an open file known by the file descriptor
from a successful open, creat, dup or pipe(2) call.
Name points to a null-terminated string naming a file; buf is the address of a buffer into which information is placed concerning the file.
It is unnecessary to have any permissions at all with respect to the file, but all directories leading to the file must be searchable. The
layout of the structure pointed to by buf as defined in <stat.h> is given below. St_mode is encoded according to the `#define' statements.
The mode bits 0000070 and 0000007 encode group and others permissions (see chmod(2)). The defined types, ino_t, off_t, time_t, name vari-
ous width integer values; dev_t encodes major and minor device numbers; their exact definitions are in the include file <sys/types.h> (see
types(5).
When fildes is associated with a pipe, fstat reports an ordinary file with restricted permissions. The size is the number of bytes queued
in the pipe.
st_atime is the file was last read. For reasons of efficiency, it is not set when a directory is searched, although this would be more
logical. st_mtime is the time the file was last written or created. It is not set by changes of owner, group, link count, or mode.
st_ctime is set both both by writing and changing the i-node.
SEE ALSO
ls(1), filsys(5)
DIAGNOSTICS
Zero is returned if a status is available; -1 if the file cannot be found.
ASSEMBLER
(stat = 18.)
sys stat; name; buf
(fstat = 28.)
(file descriptor in r0)
sys fstat; buf
STAT(2)