Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

In the man page of cat, -u means (ignored)

[raj@localhost zzz]$ cat file1 
hello world 
1 2 3 4 5 6 7 8 9 0
! @ # $ % ^ & * ( ) _ + ~ ` ; ' , .{ } [ ] = | \ / -



[raj@localhost zzz]$ cat -u file1
hello world 
1 2 3 4 5 6 7 8 9 0
! @ # $ % ^ & * ( ) _ + ~ ` ; ' , .{ } [ ] = | \ / -

When should we use the -u option?

And what it will ignore?

share|improve this question

2 Answers 2

The option -u is so that cat and hence Unix/Linux is POSIX compliant. The specification says:

The following option shall be supported:

   -u     Write bytes from the input file to the standard output without delay as each is read.

In practice, cat does this automatically and there's no way to turn it off so the option is accepted but ignored as it has no effect on the behaviour.

share|improve this answer

The option itself is being ignored. It probably existed in older or different versions of cat, so it does not end in an error if an older script uses it, but it does not change cat's behaviour in any way.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.