LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 03-12-2009, 10:24 AM   #1
FEL
LQ Newbie
 
Registered: Feb 2009
Posts: 12

Rep: Reputation: 0
Exclamation Contents of "/" and "/etc"? Help needed!


Hello there, I am a bit tired and just made a horrible mistake.

Instead of doing:
Code:
x:/etc/openvpn# mv * ..
I did:
Code:
x:/etc/# mv * ..
So right now all the contents of "/etc/" is residing in "/". Can someone please help me sort this out? Perhaps someone running Debian 4 could list the contents of their system root? That way I would be able to guessestimate which files and folders should go in /etc/.

Thanks in advance for helping me.

*holds breath*

Last edited by FEL; 03-12-2009 at 10:42 AM.
 
Old 03-12-2009, 10:58 AM   #2
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,063

Rep: Reputation: 381Reputation: 381Reputation: 381Reputation: 381
The contents can vary a bit from system to system, to be completely sure I think that the best option would be that you paste the output of "ls /" into pastebin.com, and then link it here so we can review it and give a more accurate response.

Things that you can find in / usually are:

Code:
bin  boot  dev  etc  home  lib  lib32  lib64  media  mnt  opt  proc  root  sbin  sys  tmp  usr  var
Some of these might not be there, and there could be more stuff.
 
Old 03-12-2009, 11:04 AM   #3
FEL
LQ Newbie
 
Registered: Feb 2009
Posts: 12

Original Poster
Rep: Reputation: 0
Hello again,

I used this as reference and moved some stuff back to "/etc/". Here's what I left in "/":
Code:
x:/# ls -la
total 104
drwxr-xr-x  22 root root  4096 2009-03-12 15:53 .
drwxr-xr-x  22 root root  4096 2009-03-12 15:53 ..
drwxr-xr-x   2 root root  4096 2009-02-02 19:17 bin
drwxr-xr-x   3 root root  4096 2009-02-09 11:30 boot
lrwxrwxrwx   1 root root    11 2008-12-22 02:24 cdrom -> media/cdrom
drwxr-xr-x  13 root root  4140 2009-03-12 14:42 dev
drwxr-xr-x   3 root root  4096 2008-12-22 21:49 emul
drwxr-xr-x  67 root root  4096 2009-03-12 15:53 etc
drwxr-xr-x  19 root root  4096 2009-03-09 18:41 home
drwxr-xr-x  11 root root 12288 2009-02-09 01:49 lib
lrwxrwxrwx   1 root root    20 2008-12-22 21:49 lib32 -> /emul/ia32-linux/lib
lrwxrwxrwx   1 root root     4 2008-12-22 16:24 lib64 -> /lib
drwx------   2 root root 16384 2008-12-22 02:18 lost+found
drwxr-xr-x   4 root root  4096 2008-12-22 02:24 media
drwxr-xr-x   7 root root  4096 2009-02-17 14:37 mnt
drwxr-xr-x   2 root root  4096 2008-12-22 02:25 opt
dr-xr-xr-x 108 root root     0 2009-03-09 18:55 proc
drwxr-xr-x  11 root root  4096 2009-02-21 12:59 root
drwxr-xr-x   2 root root  4096 2009-02-17 17:32 sbin
drwxr-xr-x   2 root root  4096 2008-12-22 02:25 srv
drwxr-xr-x  11 root root     0 2009-03-09 18:55 sys
drwxrwxrwt   8 root root 12288 2009-03-12 15:10 tmp
drwxr-xr-x  11 root root  4096 2008-12-22 21:49 usr
drwxr-xr-x  14 root root  4096 2008-12-22 16:19 var
And here's the contents of "/etc/":
Code:
x:/etc# ls -la
total 1412
drwxr-xr-x 67 root root     4096 2009-03-12 15:59 .
drwxr-xr-x 22 root root     4096 2009-03-12 15:53 ..
drwxr-xr-x  3 root root     4096 2008-12-22 02:26 acpi
-rw-r--r--  1 root root     2803 2008-12-22 02:25 adduser.conf
-rw-r--r--  1 root root       44 2009-03-09 18:54 adjtime
-rw-r--r--  1 root root      205 2008-12-22 20:14 aliases
drwxr-xr-x  2 root root     4096 2009-03-09 18:40 alternatives
drwxr-xr-x  7 root root     4096 2009-02-02 22:00 apache2
drwxr-xr-x  3 root root     4096 2009-01-06 17:17 apm
drwxr-xr-x  4 root root     4096 2008-12-22 02:26 apt
-rw-r--r--  1 root root     1071 2006-12-11 23:28 bash.bashrc
-rw-r--r--  1 root root   215907 2006-12-11 23:28 bash_completion
drwxr-xr-x  2 root root     4096 2009-02-09 11:16 bash_completion.d
-rw-r--r--  1 root root      528 2009-02-19 15:10 blkid.tab
-rw-r--r--  1 root root      528 2009-02-17 00:54 blkid.tab.old
drwxr-xr-x  2 root root     4096 2008-12-22 02:25 calendar
drwxr-xr-x  2 root root     4096 2008-12-22 02:26 console
drwxr-xr-x  2 root root     4096 2008-12-22 02:26 console-tools
drwxr-xr-x  2 root root     4096 2009-01-10 00:01 cron.d
drwxr-xr-x  2 root root     4096 2009-02-02 19:17 cron.daily
drwxr-xr-x  2 root root     4096 2008-12-22 02:25 cron.hourly
drwxr-xr-x  2 root root     4096 2008-12-22 02:36 cron.monthly
-rw-r--r--  1 root root      724 2006-12-20 01:20 crontab
drwxr-xr-x  2 root root     4096 2008-12-22 02:27 cron.weekly
drwxr-xr-x  2 root root     4096 2008-11-30 12:09 cups
-rw-------  1 root root      213 2008-12-26 02:22 ddclient.conf
-rw-r--r--  1 root root     2673 2008-03-13 11:32 debconf.conf
-rw-r--r--  1 root root        4 2006-10-28 15:20 debian_version
drwxr-xr-x  2 root root     4096 2009-02-02 19:17 default
-rw-r--r--  1 root root      600 2007-01-19 08:25 deluser.conf
drwxr-xr-x  4 root root     4096 2009-01-05 04:41 dhcp3
drwxr-xr-x  3 root root     4096 2008-12-24 23:19 dpkg
drwxr-xr-x  3 root root     4096 2009-02-02 14:06 emacs
-rw-r--r--  1 root root      312 2007-01-20 10:46 email-addresses
-rw-r--r--  1 root root       19 2008-12-22 02:26 environment
drwxr-xr-x  3 root root     4096 2008-12-22 20:15 exim4
-rw-r--r--  1 root root     8366 2007-03-26 16:28 ffserver.conf
-rw-r--r--  1 root root   357206 2009-02-09 01:22 files
-rw-r--r--  1 root root      901 2009-03-12 14:50 fstab
-rw-------  1 root root      832 2009-02-27 18:28 fstab.save
-rw-r--r--  1 root root      132 2008-11-04 15:55 ftpusers
-rw-r--r--  1 root root      588 2007-01-27 11:37 GeoIP.conf.default
drwxr-xr-x  2 root root     4096 2008-12-22 02:25 groff
-rw-r--r--  1 root root      746 2009-03-09 18:41 group
-rw-------  1 root root      758 2009-03-09 17:14 group-
-rw-r-----  1 root shadow    633 2009-03-09 18:41 gshadow
-rw-------  1 root root      641 2009-03-09 17:14 gshadow-
-rw-r--r--  1 root root     4793 2007-02-17 04:52 hdparm.conf
-rw-r--r--  1 root root        9 2006-08-07 19:14 host.conf
-rw-r--r--  1 root root        5 2008-12-22 02:25 hostname
-rw-r--r--  1 root root      291 2009-02-17 03:21 hosts
-rw-r--r--  1 root root      677 2008-12-22 02:25 hosts.allow
-rw-r--r--  1 root root      901 2008-12-22 02:25 hosts.deny
drwxr-xr-x  4 root root     4096 2009-03-09 18:20 iceweasel
-rw-r--r--  1 root root     1266 2009-02-11 14:29 inetd.conf
drwxr-xr-x  2 root root     4096 2009-03-09 18:41 init.d
drwxr-xr-x  5 root root     4096 2008-12-22 02:26 initramfs-tools
drwxr-xr-x  2 root root     4096 2008-12-22 02:25 initrd
lrwxrwxrwx  1 root root       30 2008-12-22 02:26 initrd.img -> boot/initrd.img-2.6.18-6-amd64
-rw-r--r--  1 root root     2008 2008-05-21 10:44 inittab
-rw-r--r--  1 root root     1723 2006-12-19 16:37 inputrc
-rw-r--r--  1 root root       28 2006-10-28 16:07 issue
-rw-r--r--  1 root root       21 2006-10-28 16:07 issue.net
-rw-r--r--  1 root root      240 2008-12-22 02:27 kernel-img.conf
-rw-r--r--  1 root root     1006 2007-02-25 07:54 kernel-pkg.conf
drwxr-xr-x  2 root root     4096 2008-12-22 02:26 ldap
-rw-r--r--  1 root root    32829 2009-03-09 18:42 ld.so.cache
-rw-r--r--  1 root root       33 2008-12-22 02:25 ld.so.conf
drwxr-xr-x  2 root root     4096 2009-03-09 18:42 ld.so.conf.d
-rw-r--r--  1 root root       19 2008-12-24 23:19 locale.gen
-rw-r--r--  1 root root      675 2008-12-22 02:26 localtime
drwxr-xr-x  5 root root     4096 2008-12-22 17:33 logcheck
-rw-r--r--  1 root root     9707 2007-02-27 20:13 login.defs
-rw-r--r--  1 root root      599 2006-04-09 00:36 logrotate.conf
drwxr-xr-x  2 root root     4096 2009-02-16 16:20 logrotate.d
drwxr-xr-x  2 root root     4096 2007-07-26 22:36 lsb-base
-rw-r--r--  1 root root   139827 2006-11-27 09:52 lynx.cfg
-rw-r--r--  1 root root      111 2007-09-12 22:09 magic
-rw-r--r--  1 root root     4415 2009-03-09 18:40 mailcap
-rw-r--r--  1 root root      449 2006-12-05 04:22 mailcap.order
-rw-r--r--  1 root root       12 2008-12-22 20:15 mailname
-rw-r--r--  1 root root      125 2006-03-16 14:34 mail.rc
-rw-r--r--  1 root root     4696 2007-01-29 13:20 manpath.config
drwxr-xr-x  2 root root     4096 2008-12-26 17:55 mc
-rw-r--r--  1 root root    20847 2006-12-05 04:22 mime.types
-rw-r--r--  1 root root      330 2007-12-06 16:55 mke2fs.conf
drwxr-xr-x  3 root root     4096 2008-12-22 02:26 modprobe.d
-rw-r--r--  1 root root      200 2008-12-22 02:26 modules
lrwxrwxrwx  1 root root       13 2008-12-22 02:25 motd -> /var/run/motd
-rw-r--r--  1 root root      286 2008-12-22 02:25 motd.tail
-rw-r--r--  1 root root      515 2009-03-12 14:50 mtab
drwxr-xr-x  3 root root     4096 2008-12-22 17:33 mysql
-rw-r--r--  1 root root     7672 2007-05-24 22:40 nanorc
-rw-r--r--  1 root root      611 2008-12-18 16:26 Net
drwxr-xr-x  7 root root     4096 2008-12-22 02:26 network
-rw-r--r--  1 root root       60 2008-12-22 02:26 networks
-rw-r--r--  1 root root      475 2006-08-28 18:33 nsswitch.conf
-rw-r--r--  1 root root     1582 2007-03-04 14:05 ntp.conf
drwxr-xr-x  3 root root     4096 2009-03-12 15:08 openvpn
-rw-r--r--  1 root root      552 2007-10-21 21:32 pam.conf
drwxr-xr-x  2 root root     4096 2009-02-02 19:17 pam.d
-rw-r--r--  1 root root     1698 2009-03-09 18:41 passwd
-rw-------  1 root root     1738 2009-03-09 17:15 passwd-
drwxr-xr-x  4 root root     4096 2008-12-22 02:36 perl
drwxr-xr-x  2 root root     4096 2008-12-22 18:38 php
drwxr-xr-x  3 root root     4096 2008-12-22 20:14 ppp
-rw-r--r--  1 root root      475 2006-10-28 15:42 profile
drwxr-xr-x  2 root root     4096 2009-02-11 14:29 proftpd
-rw-r--r--  1 root root     2478 2007-02-02 03:09 protocols
-rw-------  1 root root        0 2008-12-22 02:25 .pwd.lock
drwxr-xr-x  2 root root     4096 2008-12-22 21:49 python
drwxr-xr-x  2 root root     4096 2008-12-22 21:49 python2.4
drwxr-xr-x  2 root root     4096 2009-03-09 18:54 rc0.d
drwxr-xr-x  2 root root     4096 2009-03-09 17:16 rc1.d
drwxr-xr-x  2 root root     4096 2009-03-09 18:54 rc2.d
drwxr-xr-x  2 root root     4096 2009-03-09 18:54 rc3.d
drwxr-xr-x  2 root root     4096 2009-03-09 17:16 rc4.d
drwxr-xr-x  2 root root     4096 2009-03-09 18:54 rc5.d
drwxr-xr-x  2 root root     4096 2009-03-09 18:54 rc6.d
-rwxr-xr-x  1 root root      306 2008-12-22 02:25 rc.local
drwxr-xr-x  2 root root     4096 2009-01-06 17:17 rcS.d
-rw-r--r--  1 root root      128 2009-03-12 15:40 resolv.conf
-rwxr-xr-x  1 root root      268 2007-12-26 18:26 rmt
-rw-r--r--  1 root root      887 2007-02-02 03:09 rpc
drwxr-xr-x  2 root root     4096 2008-12-22 19:54 samba
-rw-r--r--  1 root root     3578 2007-03-05 09:34 screenrc
-rw-r--r--  1 root root      666 2007-03-24 19:35 scsi_id.config
-rw-r--r--  1 root root      994 2007-02-27 20:13 securetty
drwxr-xr-x  2 root root     4096 2008-12-22 02:25 security
-rw-r--r--  1 root root    18293 2008-12-22 21:49 services
-rw-r-----  1 root shadow   1548 2009-03-09 18:41 shadow
-rw-------  1 root root     1606 2009-03-09 17:15 shadow-
-rw-r--r--  1 root root      171 2008-12-27 21:52 shells
drwxr-xr-x  4 root root     4096 2008-12-22 18:43 skel
drwxr-xr-x  2 root root     4096 2008-12-22 02:30 ssh
drwxr-xr-x  4 root root     4096 2009-02-02 19:17 ssl
-rw-r--r--  1 root root        0 2009-03-12 15:59 stuff
drwxr-xr-x  2 root root     4096 2009-02-02 14:06 subversion
-rw-r--r--  1 root root      776 2009-01-05 20:51 sysctl.conf
-rw-r--r--  1 root root     1785 2008-12-26 14:49 syslog.conf
drwxr-xr-x  2 root root     4096 2008-12-22 02:25 terminfo
-rw-r--r--  1 root root       17 2008-12-22 02:26 timezone
drwxr-xr-x  2 root root     4096 2008-12-24 04:27 torrentflux
-rw-r--r--  1 root root     1260 2007-02-25 20:30 ucf.conf
drwxr-xr-x  4 root root     4096 2009-01-06 17:17 udev
-rw-r--r--  1 root root      805 2007-08-17 10:53 updatedb.conf
drwxr-xr-x  2 root root     4096 2008-12-26 19:47 vga
drwxr-xr-x  2 root root     4096 2008-12-22 02:25 vim
lrwxrwxrwx  1 root root       27 2008-12-22 02:26 vmlinuz -> boot/vmlinuz-2.6.18-6-amd64
drwxr-xr-x  8 root root     4096 2009-03-09 18:56 vmware
drwxr-xr-x  2 root root     4096 2008-12-24 23:02 .vmware
drwxr-xr-x  2 root root     4096 2008-12-23 21:07 vmware-vix
-rw-r--r--  1 root root     4221 2006-06-28 18:53 wgetrc
drwxr-xr-x  4 root root     4096 2008-12-22 19:06 X11
Please SHOUT and SLAP me if something doesn't look right!

Last edited by FEL; 03-12-2009 at 11:05 AM.
 
Old 03-12-2009, 11:09 AM   #4
jdkaye
LQ Guru
 
Registered: Dec 2008
Location: Westgate-on-Sea, Kent, UK
Distribution: Debian Testing Amd64
Posts: 5,464

Rep: Reputation: Disabled
Quote:
Originally Posted by FEL View Post
Hello there, I am a bit tired and just made a horrible mistake.

Instead of doing:
Code:
x:/etc/openvpn# mv * ..
I did:
Code:
x:/etc/# mv * ..
So right now all the contents of "/etc/" is residing in "/". Can someone please help me sort this out? Perhaps someone running Debian 4 could list the contents of their system root? That way I would be able to guessestimate which files and folders should go in /etc/.

Thanks in advance for helping me.

*holds breath*
Since the contents of / is much more modest than the contents of /etc your best strategy is to take a list of what should be in / and move it to a temporary location. Once safely out of the way, you can then move what's left to /etc and move back the / stuff from the temporary location to / . It may not be perfect but it should be pretty close to what you had before. Here's the contents of my / folder. It's from Squeeze but it shouldn't be that different.root.txt When in doubt (there shouldn't be many cases) save a copy of the doubtful file/folder somewhere else where you can remember it and you can always undo anything bad.
Cheers,
jdk
 
Old 03-12-2009, 11:09 AM   #5
malekmustaq
Senior Member
 
Registered: Dec 2008
Location: root
Distribution: Slackware & BSD
Posts: 1,617

Rep: Reputation: 442Reputation: 442Reputation: 442Reputation: 442Reputation: 442
FEL,

sensible question. the root of most GNU/Linux filesystems have only few folders with few "links", usually between 17 to 20 of them, the folders ought be memorized by the Linux user, they are:

bin dev home lost+found mnt proc sbin sys usr
boot etc lib media opt root srv tmp var
initrd.img vmlinuz

the last two are not folders but links to impt files somewhere inside one of those folders. Its time to memorize them, the rest of your files you may cp back to your /etc.

hope it helps.
 
Old 03-12-2009, 11:11 AM   #6
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,063

Rep: Reputation: 381Reputation: 381Reputation: 381Reputation: 381
I am 99% sure that these don't belong into your /etc, in fact, initrd.img and vmlinuz are symlink, and are probably broken since there shouldn't be a "boot/" directory under /etc/.

Code:
drwxr-xr-x  2 root root     4096 2008-12-22 02:25 initrd
lrwxrwxrwx  1 root root       30 2008-12-22 02:26 initrd.img -> boot/initrd.img-2.6.18-6-amd64
lrwxrwxrwx  1 root root       27 2008-12-22 02:26 vmlinuz -> boot/vmlinuz-2.6.18-6-amd64
In between the rest I see nothing that's obviously wrong, but I haven't used debian for years now. However, nothing critical should be out of place now.
 
Old 03-12-2009, 11:15 AM   #7
openSauce
Member
 
Registered: Oct 2007
Distribution: Fedora, openSUSE
Posts: 252

Rep: Reputation: 39
Looks about right, well done!

I don't know what /emul is - don't have it in / or /etc on my Fedora machine. Take a look inside it - if it contains config files, it should probably be in /etc/

.pwd.lock should probably be in /. Empty hidden files get put in / from time to time as a flag to do something (usually at boot or shutdown). Don't know what that one does, or if it's actually important.

/etc/vmlinuz needs to be moved back to / - it's a symlink to /boot, but it's a relative rather than an absolute path so it's expecting to be in the same dir as boot (if you have colours switched on in your ls command, you'll see the link is broken atm).
 
Old 03-13-2009, 02:30 PM   #8
FEL
LQ Newbie
 
Registered: Feb 2009
Posts: 12

Original Poster
Rep: Reputation: 0
Since my last post I've moved initrd, initrd.img, .pwd.lock and vmlinuz according to i92guboj's and openSauce's directions.

Everything seems to be functioning as usual, although I haven't rebooted my system yet.

Thanks everyone for all your help and suggestions!
 
  


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
Telling people to use "Google," to "RTFM," or "Use the search feature" Ausar General 77 03-21-2010 12:26 PM
net working eth0 eth1 wlan0 "no connection" "no LAN" "no wi-fi" Cayitano Linux - Newbie 5 12-09-2007 08:11 PM
Standard commands give "-bash: open: command not found" even in "su -" and "su root" mibo12 Linux - General 4 11-11-2007 11:18 PM
LXer: Displaying "MyComputer", "Trash", "Network Servers" Icons On A GNOME Desktop LXer Syndicated Linux News 0 04-02-2007 09:31 AM
K3b: - Howto re-dock "Directories" and "Contents" windows back into the main window? hagies Linux - Software 4 04-26-2006 09:38 AM


All times are GMT -5. The time now is 09:53 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