11-11-2008
Hi Jim mcnamara,
As i am poor at scripting.. Could you please send me in the form of script that helps me alot...
And i am going to use that pathname(which is too long) as first argument in statvfs systemcall...
int statvfs (const char *path, struct statvfs *buf);
Thanks,
Mansa
9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi All,
I want to choose the maximum value from a column values.
eg -
234
23
567
43
2456
5
678
8978
from thses values how to choose the max value ?
thanks.
roger. (3 Replies)
Discussion started by: Nayanajith
3 Replies
2. Shell Programming and Scripting
1> Can anyone tell me what is the maximum no of parameters that can be passed to a file
2> i have 100 files amongst which in 500 files i have a string which needs to be searched how would get the names of those files. (1 Reply)
Discussion started by: Shivdatta
1 Replies
3. Shell Programming and Scripting
How to set the max limit for socket opening TCL
Thanks,
Ajay (1 Reply)
Discussion started by: aju_kup
1 Replies
4. Programming
Hii can anyone pls tell how to limit the max no of message in a posix message queue. I have made changes in proc/sys/fs/mqueue/msg_max
But still whenever i try to read the value of max. message in the queue using attr.mq_curmsgs (where struct mq_attr attr) its giving the default value as 10.... (0 Replies)
Discussion started by: mohit3884
0 Replies
5. Linux
Oct 31 00:00:02 FIREWALL003 syslogd 1.4.1: restart.
Oct 31 00:00:02 FIREWALL003 syslogd 1.4.1: restart.
Oct 31 00:00:02 FIREWALL003 syslogd 1.4.1: restart.
Oct 31 02:37:09 FIREWALL003 kernel: srmLINUX: segfault at 00000000303a3031 rip 000000000026fe54 rsp 00000000ffbd05b8 error 4
Oct 31... (5 Replies)
Discussion started by: itik
5 Replies
6. Shell Programming and Scripting
Hi scripters,
I know sed can do this, but I'm not to well trained to achieve this.
Problem: wherever I am in my filesystem, with a 'pwd' I can check where I am.
It may be "/usr/local/apache/etc/conf" or "/opt/apache/var/log/backup" or "/var/log/backup/apache/2009/december"
Now from these... (7 Replies)
Discussion started by: Qube
7 Replies
7. HP-UX
hi,
iam getting error when i assign a variable to an array of more that 315 character in length
set -A array <variable>
<variable> value is 000001 000002 and up to 000045
it is giving error as
"The specified subscript cannot be greater than 1024."
can any one help me to solve this (2 Replies)
Discussion started by: gomathi
2 Replies
8. Solaris
Hi all, I'm using to Solaris machine. When I run a simple script this messenger come out:"limit: stacksize: Can't remove limit". Any one know the way to resolve this problem without reboot the machine?
Thanks in advance. (3 Replies)
Discussion started by: Diabolist9
3 Replies
9. Ubuntu
Ubuntu users,
I am configuring an Ubuntu 14.04 server as a load injector.
I have appended the hard and soft limits to /etc/security/limits.conf for any user (apart from root):
* hard nofile 65536
* soft nofile 65536
I am seeing the figure 65536 in... (5 Replies)
Discussion started by: aidylewis
5 Replies
LEARN ABOUT CENTOS
statvfs
STATVFS(3) Linux Programmer's Manual STATVFS(3)
NAME
statvfs, fstatvfs - get file system statistics
SYNOPSIS
#include <sys/statvfs.h>
int statvfs(const char *path, struct statvfs *buf);
int fstatvfs(int fd, struct statvfs *buf);
DESCRIPTION
The function statvfs() returns information about a mounted file system. path is the pathname of any file within the mounted file system.
buf is a pointer to a statvfs structure defined approximately as follows:
struct statvfs {
unsigned long f_bsize; /* file system block size */
unsigned long f_frsize; /* fragment size */
fsblkcnt_t f_blocks; /* size of fs in f_frsize units */
fsblkcnt_t f_bfree; /* # free blocks */
fsblkcnt_t f_bavail; /* # free blocks for unprivileged users */
fsfilcnt_t f_files; /* # inodes */
fsfilcnt_t f_ffree; /* # free inodes */
fsfilcnt_t f_favail; /* # free inodes for unprivileged users */
unsigned long f_fsid; /* file system ID */
unsigned long f_flag; /* mount flags */
unsigned long f_namemax; /* maximum filename length */
};
Here the types fsblkcnt_t and fsfilcnt_t are defined in <sys/types.h>. Both used to be unsigned long.
The field f_flag is a bit mask (of mount flags, see mount(8)). Bits defined by POSIX are
ST_RDONLY
Read-only file system.
ST_NOSUID
Set-user-ID/set-group-ID bits are ignored by exec(3).
It is unspecified whether all members of the returned struct have meaningful values on all file systems.
fstatvfs() returns the same information about an open file referenced by descriptor fd.
RETURN VALUE
On success, zero is returned. On error, -1 is returned, and errno is set appropriately.
ERRORS
EACCES (statvfs()) Search permission is denied for a component of the path prefix of path. (See also path_resolution(7).)
EBADF (fstatvfs()) fd is not a valid open file descriptor.
EFAULT Buf or path points to an invalid address.
EINTR This call was interrupted by a signal.
EIO An I/O error occurred while reading from the file system.
ELOOP (statvfs()) Too many symbolic links were encountered in translating path.
ENAMETOOLONG
(statvfs()) path is too long.
ENOENT (statvfs()) The file referred to by path does not exist.
ENOMEM Insufficient kernel memory was available.
ENOSYS The file system does not support this call.
ENOTDIR
(statvfs()) A component of the path prefix of path is not a directory.
EOVERFLOW
Some values were too large to be represented in the returned struct.
CONFORMING TO
POSIX.1-2001.
NOTES
The Linux kernel has system calls statfs(2) and fstatfs(2) to support this library call.
The current glibc implementations of
pathconf(path, _PC_REC_XFER_ALIGN);
pathconf(path, _PC_ALLOC_SIZE_MIN);
pathconf(path, _PC_REC_MIN_XFER_SIZE);
respectively use the f_frsize, f_frsize, and f_bsize fields of the return value of statvfs(path,buf).
SEE ALSO
statfs(2)
COLOPHON
This page is part of release 3.53 of the Linux man-pages project. A description of the project, and information about reporting bugs, can
be found at http://www.kernel.org/doc/man-pages/.
Linux 2003-08-22 STATVFS(3)