Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

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

I am trying to create a file contating the info from my /etc/passwd file but can not seem to get it to work. Can anyone help me out?

share|improve this question

closed as too localized by Luis Alvarado Mar 14 '13 at 16:54

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

You might want to provide some specifics. What is it that you are exactly trying to do? – Aron Rotteveel Feb 1 '11 at 15:51
Question too vague to be meaningful. – psusi Feb 1 '11 at 16:47
  1. Click PlacesComputer and then browse to File Systemetc.
  2. Drag passwd to the desktop:


You now have a copy of /etc/passwd that you are free to edit and rename.

share|improve this answer

If you do not want to use cp then you may try this from the location where you created filepassword;

cat "/etc/passwd" >> filepassword

Will append the contents of file /etc/passwd to file, filepassword, hope this is what you want.

share|improve this answer

In this instance, the correct command would be cp /etc/passwd /path/to/file/you/want/to/save/to - for other files, you can drop the sudo.

share|improve this answer
I created a file called "filepassword" and now want it to contain the info from /etc/passwd file. – user10034 Feb 1 '11 at 15:55
Yeah, a straight copy seems like it's what you want. – Nick Pascucci Feb 1 '11 at 15:58
Alright. So in that case, it'd be `sudo cp /etc/passwd ~/filepassword' - your file would be found in your home directory. – James Feb 1 '11 at 16:09
sudo is not required here. – ændrük Feb 1 '11 at 18:44

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