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.

The kernel mttr documentation gives this command:

echo "base=0xf8000000 size=0x400000 type=write-combining" >| /proc/mtrr

While I know what > and | do, I have never seen them in combination. Googling bash >| is not too helpful. My experiments did not show any difference between echo bla > foo and echo bla >| foo.

share|improve this question

2 Answers 2

up vote 5 down vote accepted

Searching man bash for the strings shows

-C If set, bash does not overwrite an existing file with the >, >&, and <> re- direction operators. This may be overridden when creating output files by using the redirection operator >| instead of >.

under set.

So, it means "overwrite even if -C is set".

share|improve this answer
    
D'oh. Could have though of looking into the man page. –  mdsl May 2 at 14:15

As you know, echo writes to to the terminal... When used with a redirection operator the echo gets sent to the receiving file, but in this case /proc is not a file... /proc is equivalent to kernel32.dll in windows, ie if I want information about the kernel, I query /proc

Since /proc allows direct access to the running kernel the output must be redirected to the pipe and then the info in the pipe is dumped into the MTRR register for your GPU, as choroba said, doing it this way ensures the redirection is FORCED, as this is your kernel. This command sets The BASE ADDRESS in memory to 4160749568(dec) or 0xf8000000(hex) with a 4GB Memory allocation and enables write combining

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.