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.

I want to split a file into multiple files with at most 25 lines each.

I'm using this:

split -l 25 /etc/adduser.conf > /home/ubuntu/PL/trab3/rc_

But I do not get the files I expect.

How can I get files with filenames like rc_01, rc_02, etc.?

share|improve this question

1 Answer 1

Redirection (the > sign) is handled by the shell, and it can only output to a single file, the file you name. Omit the >, so that /home/ubuntu/PL/trab3/rc_ is passed to split as a command line argument, so that it can use that as its output prefix.

share|improve this answer
PS: Instead of just saying that something "doesn't work," it's better to say what happens... what error message(s) you get, what happens that you weren't expecting, what doesn't happen that you were expecting, etc. –  coneslayer Mar 26 '10 at 18:19

Your Answer


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.