02-24-2012
I recall a user complaining that a change to the linux kernel reduced the maximum read size to 4 gigabytes. He thought this a large inconvenience for some reason. So whatever the maximum read size is, it's going to be far larger than whatever you're doing...
Of course, it was never safe for him to assume that read() did it all in one go in the first place. Lots of things can happen. You have done correctly by checking read's return value here.
10 More Discussions You Might Find Interesting
1. Programming
Hi...
I am trying to read a binary data that have different types of messages of different lengths. I am using fread() but this functions needs the size and count to read the buffer from the file. I think this may cause that the buffer overlaps other messages.
Is there an alternative to read... (1 Reply)
Discussion started by: jlrodz
1 Replies
2. Programming
Hi,
When i checked for the maximum file size on solaris 5.9
the max file size obtained was only 2147483647
and all the further writes to the file which had reached that max size is not added to that file.
even i had registered the signal SIGXFSZ, but the signal was not delivered to the... (5 Replies)
Discussion started by: matrixmadhan
5 Replies
3. AIX
Hi:-
One of our users is getting an error: "There is no process to read data written to a pipe.”
I am trying to find out what the pipe buffer size is currently set to. How do I go about this?
Thanks, (0 Replies)
Discussion started by: janet
0 Replies
4. Red Hat
hi everyone,
can any one help change the buffer cache size in redhat and suse?? this error i got when i installed oracle 10g and it went well and when i try to mount the database using startup cmd it says too many buffer cache parameters (error code : ora-1034)
thnq in advance (0 Replies)
Discussion started by: gsr_kashyap
0 Replies
5. UNIX for Dummies Questions & Answers
What's the maximum file size supported by unix. (3 Replies)
Discussion started by: nagalenoj
3 Replies
6. Shell Programming and Scripting
Hi All,
I am trying to read output from a command. The output format is as follows:
Thursday 13 Mar 2008 Information
This is sample text
Friday 14 Mar 2008 Warning
This is one more sample text
First line contains informtation (date etc) and the 2nd line contains some information.
... (3 Replies)
Discussion started by: ssunda6
3 Replies
7. UNIX for Dummies Questions & Answers
Hi All,
- block size of 512KB & every address requires 4 bits
- The inode structure contains 10 direct pointers, 1 single
indirect, 1 double indirect & 1 triple indirect pointer
What could be the possible maximum file size for this
system
Any guess? I am unable to understand the question... (0 Replies)
Discussion started by: preethgideon
0 Replies
8. Programming
# include <stdio.h>
# include <fcntl.h>
# include <stdlib.h>
# include <sys/stat.h>
int main(int argc, char *argv)
{
int fRead, fPadded, padVal;
int btRead;
int BUFFSIZE = 512;
char buff;
if (argc != 4)
{
printf ("Please provide all of the... (3 Replies)
Discussion started by: naranja18she
3 Replies
9. UNIX for Dummies Questions & Answers
Hi,
I am using the below command to get the output in a file called "Logs.txt"
tail -f filename | egrep -i "cpu | hung " >> Logs.txt The problem is the Logs.txt file gets updated only after the buffer is 8Kb, but i want to update the file immediately and not wait for the buffer to get 8kb.
Is... (8 Replies)
Discussion started by: @bhi
8 Replies
10. Programming
Hi,
Can I find size of the file from size of the buffer written?
nbECRITS = fwrite(strstr(data->buffer, ";") + 1, sizeof(char), (data->buffsize) - LEN_NOM_FIC, fic_sortie);
Thank You :) (1 Reply)
Discussion started by: ezee
1 Replies
LEARN ABOUT CENTOS
blockdev
BLOCKDEV(8) System Administration BLOCKDEV(8)
NAME
blockdev - call block device ioctls from the command line
SYNOPSIS
blockdev [-q] [-v] command [command...] device [device...]
blockdev --report [device...]
DESCRIPTION
The utility blockdev allows one to call block device ioctls from the command line.
OPTIONS
-V Print version and exit.
-q Be quiet.
-v Be verbose.
--report
Print a report for the specified device. It is possible to give multiple devices. If none is given, all devices which appear in
/proc/partitions are shown. Note that the partition StartSec is in 512-byte sectors.
COMMANDS
It is possible to give multiple devices and multiple commands.
--flushbufs
Flush buffers.
--getalignoff
Get alignment offset.
--getbsz
Print blocksize in bytes.
--getdiscardzeroes
Get discard zeroes support status.
--getfra
Get filesystem readahead in 512-byte sectors.
--getiomin
Get minimum I/O size.
--getioopt
Get optimal I/O size.
--getmaxsect
Get max sectors per request
--getpbsz
Get physical block (sector) size.
--getra
Print readahead (in 512-byte sectors).
--getro
Get read-only. Print 1 if the device is read-only, 0 otherwise.
--getsize64
Print device size in bytes.
--getsize
Print device size (32-bit!) in sectors. Deprecated in favor of the --getsz option.
--getss
Print sectorsize in bytes - usually 512.
--getsz
Get size in 512-byte sectors.
--rereadpt
Reread partition table
--setbsz bytes
Set blocksize. Note that the block size is specific to the current file descriptor opening the block device, so the change of block
size only persists for as long as blockdev has the device open, and is lost once blockdev exits.
--setfra sectors
Set filesystem readahead (same like --setra on 2.6 kernels).
--setra sectors
Set readahead (in 512-byte sectors).
--setro
Set read-only.
--setrw
Set read-write.
AUTHOR
blockdev was written by Andries E. Brouwer and rewritten by Karel Zak.
AVAILABILITY
The blockdev command is part of the util-linux package and is available from ftp://ftp.kernel.org/pub/linux/utils/util-linux/.
util-linux August 2010 BLOCKDEV(8)