Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

The problem is that the file passwd hasn't got any tag like .txt or so. So I can't copy the content by passed > userlist.txt.

share|improve this question

closed as unclear what you're asking by slm, Thomas Nyman, Anthon, Chris Down, Mat Dec 22 '13 at 16:37

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question.If this question can be reworded to fit the rules in the help center, please edit the question.

I'm not sure why you think it needs the extention .txt to be copied -- extensions have no meaning in Unix.

cp /etc/passwd userlist.txt

If you also care about LDAP/NIS/etc, and you have getent:

getent passwd > userlist.txt
share|improve this answer
I thougt it had a meaning because – user55167 Dec 22 '13 at 15:09
cp /etc/passwd userlist.txt doesnt copy the content of the file ... – user55167 Dec 22 '13 at 15:09
Write one line of shell code that writes the contents of file /etc/passwd to "/root/results/userlist.txt" ... thats what I have to do :/ – user55167 Dec 22 '13 at 15:10
cp /etc/passwd /root/results/userlist.txt will do that, as long as /root/results exists. – Chris Down Dec 22 '13 at 15:11
Ok thanks you that worked. Can you say me how I can delete specific lines which contain "bin" in the file? – user55167 Dec 22 '13 at 15:18

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