LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-01-2004, 02:51 PM   #1
VBAHole22
Member
 
Registered: May 2004
Location: Virginia
Distribution: Red Hat 9
Posts: 36

Rep: Reputation: 15
How to document configurations


I want to create a text file that has a listing of all of my current configurations. What command would I use to:

1)create the text file the first time
2)append to the end of it each time

I want to send things to this text file like the results of ifconfig

If I wanted a good snapshot of the system settings what other commands could I send the results of to this text file?

Without this forum it would be no Linux for me!
 
Old 06-01-2004, 02:56 PM   #2
youngstorm
Member
 
Registered: May 2003
Location: USA
Distribution: Fedora 21, RHEL 5,6&7, Windoze 7
Posts: 235

Rep: Reputation: 31
Hi,

run "ifconfig >> <filename>"

that will create a new file if it does not exist
and append if it does

Michael

Last edited by youngstorm; 06-01-2004 at 02:58 PM.
 
Old 06-01-2004, 03:09 PM   #3
youngstorm
Member
 
Registered: May 2003
Location: USA
Distribution: Fedora 21, RHEL 5,6&7, Windoze 7
Posts: 235

Rep: Reputation: 31
Perhaps an easier way to do this is
to a backup directory. then put multiple files there.
For ex. "ifconfig > /home/username/backup/ifconfig"
"env > /home/username/backup/env"

You see? Different files for different commands.
Easier to look up info that way.

Also, the specific info you wish to backup is
dependant on you. If you have set up a web
server you could back up your httpd.conf file.

Michael
 
Old 06-01-2004, 03:28 PM   #4
VBAHole22
Member
 
Registered: May 2004
Location: Virginia
Distribution: Red Hat 9
Posts: 36

Original Poster
Rep: Reputation: 15
cool beans!

So to backup the file you just need > and a path?

env
ifconfig
smb.conf
httpd.conf


Any others you can think of?
What about for things like open ports and mounts.
 
Old 06-01-2004, 04:30 PM   #5
youngstorm
Member
 
Registered: May 2003
Location: USA
Distribution: Fedora 21, RHEL 5,6&7, Windoze 7
Posts: 235

Rep: Reputation: 31
> always overwrites
>> appends

use them to write the output of a command
to a file. To backup a file, do this:
"cp -a <filename> /home/username/backup/"

exaples
cp -a /etc/httpd.conf /home/username/backup/
cp -a /etc/smb.conf /home/username/backup/

easy

have you got it?

Michael
 
Old 06-01-2004, 04:41 PM   #6
youngstorm
Member
 
Registered: May 2003
Location: USA
Distribution: Fedora 21, RHEL 5,6&7, Windoze 7
Posts: 235

Rep: Reputation: 31
also
you could cp your fstab file i guess
if there is some info you dont know how to get let me know

Michael
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how do i create a document, then a directory and save the document in it. jtdodge Linux - Newbie 9 06-15-2005 11:03 AM
kernel configurations jcombs_31 Slackware 2 01-04-2005 08:22 PM
Proxy configurations ioannisss Linux - Newbie 1 07-23-2004 11:03 AM
Convert openoffice document into ms document through cli? bruno buys Linux - Software 0 07-05-2004 09:59 AM
Exotic Configurations lectraplayer Linux - Hardware 0 12-03-2003 09:12 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:08 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration