The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Special Forums > UNIX Desktop for Dummies Questions & Answers
.
google unix.com



UNIX Desktop for Dummies Questions & Answers Discuss UNIX and Linux user interfaces like GNOME, KDE, CDE, and Open Office here. All UNIX and Linux Newbies Welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
how to make a line BLINKING in output and also how to increase font size in output mail2sant Shell Programming and Scripting 3 04-14-2008 07:30 AM
changing col(1) command stdout as fully buffered? sunilsbjoshi High Level Programming 1 06-09-2006 07:09 AM
changing col(1) command stdout as fully buffered? sunilsbjoshi HP-UX 0 06-09-2006 06:36 AM
changing col(1) command stdout as fully buffered? sunilsbjoshi UNIX for Advanced & Expert Users 0 06-09-2006 05:45 AM
Help capturing and reformatting buffered and unbuffered output vikingshelmut Shell Programming and Scripting 0 09-27-2005 02:27 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 08-18-2008
Xcislav Xcislav is offline
Registered User
  
 

Join Date: Jun 2008
Posts: 8
What is buffered output?

ie: man cat
....
- u The output is not buffered
  #2 (permalink)  
Old 08-18-2008
vidyadhar85's Avatar
vidyadhar85 vidyadhar85 is offline Forum Staff  
Moderator(The Tutor)
  
 

Join Date: Jun 2008
Location: INDIA
Posts: 1,390
Writes bytes from the input file to standard
output without delay as each is read

that means normal cat without -u option first read the full file in sequence as it read it store it in buffer and display the buffer one's its done..
with -u option you can avoid it
  #3 (permalink)  
Old 08-18-2008
Xcislav Xcislav is offline
Registered User
  
 

Join Date: Jun 2008
Posts: 8
it's like a standard exchange buffer in windows?
where can i poke around
  #4 (permalink)  
Old 08-18-2008
era era is offline Forum Advisor  
Herder of Useless Cats (On Sabbatical)
  
 

Join Date: Mar 2008
Location: /there/is/only/bin/sh
Posts: 3,652
I don't know what a "standard exchange buffer in Windows" is but it seriously sounds like it's not at all the same thing.

With input/output buffering you have a cache of sorts between two devices. Say, a disk: the driver reads a sector of data into a buffer, then passes it to the program which displays it. You can not read a partial sector from the disk; at end of file, you get a partially filled buffer, and a flag which tells you how much of it is actually real data.

Line buffering works on lines instead of disk sectors. Line buffered I/O reads through the next newline, then passes on the buffer.

By running tail -f on a file which is slowly being written by another program, you can see block buffering in action. The output pauses in the middle of a line, then all of a sudden, after a longish wait, you get another burst of text as another buffer of multiple lines of output is completed and written out to disk (and then read and displayed by tail). cat -u prevents this behavior, and forces unbuffered output even if the output device would call for block-buffered or line-buffered output.

Unbuffered output is much less efficient, so unless you really need unbuffered output, go for buffered.
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 11:36 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0