Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I've seen some command like

echo '* - nofile 65535' >> /etc/security/limits.conf

I know echo print something on the screen.

and limits.conf was a file in that /etc/security path.

But want does >> do here? it means something like 'to' or 'in'?

share|improve this question
    
Visit I/O redirection at linuxcommand.org/lc3_lts0070.php –  Pandya May 25 at 5:58

1 Answer 1

up vote 10 down vote accepted

>> redirects the output of the command on its left hand side to the end of the file on the right-hand side.

So,

echo '* - nofile 65535' >> /etc/security/limits.conf

will append * - nofile 65535 to the end of the /etc/security/limits.conf file, instead of printing * - nofile 65535 on the screen.

If you instead had

echo '* - nofile 65535' > /etc/security/limits.conf

(note the >> replaced by >), everything already present in /etc/security/limits.conf would have been replaced by * - nofile 65535, and not appended.

You may also like to read this question:

share|improve this answer
1  
Perfect, especially the extra '>' point. It helps me avoid possible disaster. –  Zen May 25 at 6:11

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.