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 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 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.

1  
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

3 Answers 3

  1. Click PlacesComputer and then browse to File Systemetc.
  2. Drag passwd to the desktop:

    screenshot

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. –  jrg Feb 1 '11 at 16:09
1  
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.