Hello,
Can someone please tell me which command to use to determine the available disk space on a given disk device?
I have to write a shell script that compresses files and stores them in a specific location but I am not sure how "conservative" I should be?
Thanks in advance!
Al. (4 Replies)
snmpget -v 1 -c COMMUNITYSTR hostname OID
what OIDs would I use to get information on all the processes and disk space information that are on a particular host.
where can i find out information on all of this?
thanks (3 Replies)
Are there any one-liners or short codes to separate 4-digit numbers into 2?
For example, input.txt:
1234
5678
3091
2851
Output.txt:
12 34
56 78
30 91
28 51 (7 Replies)
Ok, so i monitor disk space on remote machines using snmp. Works great for me. But whenever a particular partition happens to have Terabytes of data, snmp starts reporting negative values.
Can someone please tell me how to get around this problem?
The AllocationUnit is 512 bytes. Weird... (0 Replies)
Hello all,
I have a file with several lines like this:
(1,1) (4,10) (8,23) (17, 4) (6,8) etc.
and I need this:
( 1 , 1 ) ( 4 , 10 ) ( 8 , 23 ) ( 17 , 4 ) ( 6 , 8 )
How do I insert a space between the left parenthesis and the first number, between the first number and the comma,... (2 Replies)
Hi I have file which stores dates.
2008-09-12|2008-09-12<space1>00:00:12|<space2>2008-09-12
Some one please help me on how should I use the sub command to replace only the space which has numbers on both sides.
Expected output
2008-09-12|2008-09-1200:00:12|<space2>2008-09-12
--... (4 Replies)
This is really strange... my system's du is reporting file size smaller than it really is... and it is only happening on one of Solaris 10 I have...
#ls -lrt tracks.txt
-rw-r--r-- 1 oracle oinstall 2166525362 May 16 03:32 tracks.txt
# du -k tracks.txt
953805 tracks.txt
# du -h... (4 Replies)
Hi,
I have a file which looks like this
FORD|1333-1| 10000100010203| 100040507697|0002|356.45|5555| SSSSY|KKKKM|1000005|10| N096|10043| C987
I need the output to look like this
FORD|1333-1|10000100010203|100040507697|0002|356.45|5555| SSSSY|KKKKM|1000005|10| N096|10043| C987
The leading... (8 Replies)
username=cogiz
#!/bin/bash
shuffle() #@ USAGE: shuffle
{ #@ TODO: add options for multiple or partial decks
Deck=$(
printf "%s\n" {2,3,4,5,6,7,8,9,T,J,Q,K,A}{H,S,D,C} |
awk '## Seed the random number generator
BEGIN { srand() }
## Put a random number in front... (4 Replies)
Discussion started by: cogiz
4 Replies
LEARN ABOUT CENTOS
mmap2
MMAP2(2) Linux Programmer's Manual MMAP2(2)NAME
mmap2 - map files or devices into memory
SYNOPSIS
#include <sys/mman.h>
void *mmap2(void *addr, size_t length, int prot,
int flags, int fd, off_t pgoffset);
DESCRIPTION
This is probably not the system call you are interested; instead, see mmap(2), which describes the glibc wrapper function that invokes this
system call.
The mmap2() system call provides the same interface as mmap(2), except that the final argument specifies the offset into the file in
4096-byte units (instead of bytes, as is done by mmap(2)). This enables applications that use a 32-bit off_t to map large files (up to
2^44 bytes).
RETURN VALUE
On success, mmap2() returns a pointer to the mapped area. On error -1 is returned and errno is set appropriately.
ERRORS
EFAULT Problem with getting the data from user space.
EINVAL (Various platforms where the page size is not 4096 bytes.) offset * 4096 is not a multiple of the system page size.
mmap2() can also return any of the errors described in mmap(2).
VERSIONS
mmap2() is available since Linux 2.3.31.
CONFORMING TO
This system call is Linux-specific.
NOTES
Nowadays, the glibc mmap() wrapper function invokes this system call rather than the mmap(2) system call.
On ia64, the unit for offset is actually the system page size, rather than 4096 bytes.
SEE ALSO getpagesize(2), mmap(2), mremap(2), msync(2), shm_open(3)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 2012-04-16 MMAP2(2)