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-04-2012, 09:37 PM   #1
Odyssey1942
Member
 
Registered: Jul 2006
Posts: 287

Rep: Reputation: 30
Huge tarball-what gives?


My O/S is Ubuntu 10.04.

While working on another problem and following guidance I found on the net, I created a tarball of my /home directory. My /home consists of three directories and their "sizes":

lost + found - ? items
myusername - 18 items
tester - 9 items

checking properties, it shows

lost + found - unreadable
myusername - 10.5 GB
tester - 32.2MB

(dispensing with "tester" which if I remember correctly, I set up to work on a long ago problem, but didn't actually use it. It is essentially empty.)

The important thing is that in addition to the three directories above, there is the "home.tar.gz" tarball which I created using this command (from within /home) :

sudo tar -cjf home.tar.gz myusername

and that tarball is 20.6 GB or twice the size of /myusername. How can this be?

Also can I delete the /tester directory without causing a problem, and if so, can I simply right click in Gnome and delete?

Finally can I delete /lost & found without causing a problem?

Last edited by Odyssey1942; 03-04-2012 at 09:40 PM.
 
Old 03-04-2012, 09:51 PM   #2
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Debian, Mint, OpenBSD
Posts: 11,361
Blog Entries: 12

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
What does a du /home/username show?
 
Old 03-04-2012, 10:00 PM   #3
Odyssey1942
Member
 
Registered: Jul 2006
Posts: 287

Original Poster
Rep: Reputation: 30
pages and pages listing directories and subdirectories. Is there something specific I should look for? Thanks.
 
Old 03-04-2012, 10:47 PM   #4
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,576
Blog Entries: 31

Rep: Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195
Use du -hs /home/username instead. The -s is for "summary" (so no voluminous listing of directories) and the -h for "human readable"
 
1 members found this post helpful.
Old 03-04-2012, 10:53 PM   #5
Odyssey1942
Member
 
Registered: Jul 2006
Posts: 287

Original Poster
Rep: Reputation: 30
Thanks for the update. It returned:

Quote:
25G /home/username
Would this be 25 Gigs?
 
Old 03-05-2012, 05:30 AM   #6
Satyaveer Arya
Senior Member
 
Registered: May 2010
Location: Palm Island
Distribution: RHEL, CentOS, Debian, Oracle Solaris 10
Posts: 1,415

Rep: Reputation: 305Reputation: 305Reputation: 305Reputation: 305
Check if there are any hidden files/directories in /home/username ?

You can delete /tester directory, but first check if there is any important data of yours.

And there is no need to delete lost + found directory.

Last edited by Satyaveer Arya; 03-05-2012 at 05:34 AM.
 
1 members found this post helpful.
Old 03-05-2012, 06:01 AM   #7
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976
This is a known and annoying bug reported here: https://bugs.launchpad.net/ubuntu/+s...lus/+bug/33883. The best way to determine the actual size of a directory is by means of the command line and the du command, as suggested by frankbell and Catkin above.

Regarding the tester home directory the cleaner way to delete it is by removing the tester user.

Instead, regarding the lost+found directory, it's there for a reason: it is related to ext2/ext3/ext4 filesystems and serves to store pieces of corrupted/broken files, generated for example upon a system crash or a sudden and unexpected shutdown. At the next boot the system will forcedly check the filesystems that are not in a clean state and it will try to repair corrupted files, if any. Therefore, better to leave it alone in order to assure the proper behaviour of your system.
 
1 members found this post helpful.
Old 03-05-2012, 08:05 AM   #8
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,576
Blog Entries: 31

Rep: Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195
Quote:
Originally Posted by Odyssey1942 View Post
Would this be 25 Gigs?
Yes.

That implies ~15 GB in hidden directories and files if the linked bug is the cause of the discrepancy. Not impossible but an unusually large amount. This find command will list files over 250 MB for you to investigate (you may want to increase or decrease that 250 in case you get too many or too few files listed to be useful.
Code:
find /home/username -size +250M
 
1 members found this post helpful.
Old 03-05-2012, 09:51 PM   #9
Odyssey1942
Member
 
Registered: Jul 2006
Posts: 287

Original Poster
Rep: Reputation: 30
I am very anxious to get back to work and have taken the following steps in order to get the files across to the NEW computer.

I removed "tester" as a user (since it was never even used) and moved /oldhome out of my /home/username (into /opt) to clean the /home directory up and to reduce its total size.

I want to zip (the now much smaller) /home again, but this time have the tarball file placed outside of /home as it is created to avoid a "double compression" issue.

I have tried several variations of tar with various switches and destinations, but nothing wants to work. Have read the tar man pages, which is way too technical for me, and google is not being helpful. Could I trouble someone to please extend (and correct if needed) the line of code below to have the tarball show up in /opt (where there is space for it (or if /opt is not a good place to put it, your suggestion):

Code:
tar -czvf currenthome.tar.gz /home XYZ
where "currenthome" will be the tarball, "/home" will be the current home folder that is being tarballed, and XYZ will be whatever else is needed to actually get the tarball into /opt (or some other place you think better. I also recognize that XYZ may not be properly located in the line of code. I just put it there to represent the additional step of placing the tarball elsewhere.)

Many thanks.
 
Old 03-05-2012, 10:23 PM   #10
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,576
Blog Entries: 31

Rep: Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195
Anywhere with enough space would be a suitable temporary location. /tmp and /var/tmp are specifically for temporary files but may be emptied on shutdown/reboot.

The tar command you posted would add XYZ to the archive. You can do what you intend by something like
Code:
tar -czvf /var/tmp/currenthome.tgz /home
.tgz is conventional for compressed tar archives.
 
1 members found this post helpful.
Old 03-05-2012, 10:25 PM   #11
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Debian, Mint, OpenBSD
Posts: 11,361
Blog Entries: 12

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
I want to thank the posters who added to my knowledge of du.

For what it's worth, in my experience, there is little utility to moving hidden configuration files from an old computer to a new one except when they are files I've configured away from their default settings.

For example, I will always copy my Fluxbox menu, startup, and init files; my dot-opera directory with bookmarks, mailstore, and so on; my .pan2 directory with my newsgroup subscriptions and configuration; and my LibreOffice templates, because I've tailored them to my needs and preferences. I'll also grab my /etc/samba/smb.conf file and my rc.firewall script because I expect to reuse them.

I don't copy over any configuration files that I've left at default. Not copying over config directories and files for programs I expect to leave at default greatly decreases the size of the data needing to be transferred.

Last edited by frankbell; 03-05-2012 at 10:27 PM.
 
Old 03-05-2012, 10:33 PM   #12
Odyssey1942
Member
 
Registered: Jul 2006
Posts: 287

Original Poster
Rep: Reputation: 30
That nailed it. Thanks so much.
 
Old 03-06-2012, 08:41 AM   #13
Odyssey1942
Member
 
Registered: Jul 2006
Posts: 287

Original Poster
Rep: Reputation: 30
Arrarrgh! This is becoming more complicated. I thought that I had deleted the old home.tar.gz from the /home directory, but had not. So the new tar file of /home contained the previous tar file. (The new tar file is 32GB!)

So I deleted the new tar file from /opt, then deleted the old home.tar.gz from /home. Then emptied the trash.

Then logged out and at the intitial login screen, pressed Alt-Ctrl-F1 to bring up a command line terminal. But Alt-Ctrl-F1 now doesn't work.

I rebooted a couple of times, then powered off, but Alt-Ctrl-F1 still doesn't work. So I then logged in, brought up a console and tried to create the tar from the console, but it failed. Arrrrrgh!

So now I need to get Alt-Ctrl-F1 working again at the Login screen. Any ideas?

EDIT: Found it! Ctrl key on keyboard failed! What are the chances of that? Thanks.

Last edited by Odyssey1942; 03-06-2012 at 09:09 AM.
 
Old 03-07-2012, 09:31 AM   #14
Odyssey1942
Member
 
Registered: Jul 2006
Posts: 287

Original Poster
Rep: Reputation: 30
Still bashing away and seem to be no closer to success. In fact I am in a terrible muddle. Here is a summary of the history:

in old computer I ran:
Code:
sudo tar /opt/username120305.tar.gz /home
(put into opt to keep from creating the tarball within the directory being zipped),

then from within /opt
Code:
sudo scp username120305.tar.gz /home@192.168.0.104
which failed with error message: "permission denied, please try again" (i.e., would not accept my password [which I know is correct and retried several times]), then
Code:
sudo scp username120305.tar.gz /username@192.168.0.104
which worked

Then in /home at the new computer, I renamed /username /username2, moved username120305.tar.gz into /home and unpacked it.

Now when I boot up new computer, I put in my password at login as normal, but then get the following three error messages on a blank desktop (color only, no icons)

1)Could not update ICEauthority file /home/username/ICEauthority
2)There is a problem with the configuration server. (/usr/lib/libgconf2-4/gconf-sanity-check-2 exited with status 256)
3)Nautilus could not create the following required folders: /home/username/Desktop, /home.username.nautilus (Before running Nautilus, please create these folders, or set permissions such that Nautilus can create them.)

To add to the confusion, I cannot bring back /username2 because it is gone, and I have no idea where.

So my first question is, can anyone see anything in the above that caused this whole process to go pear shaped?

Finally could someone please give me the command to locate a specific directoryname anywhere on the computer (still looking for /username2)

I am very much a noob at the command line, so more information rather than less will be so appreciated (I hope to learn something from all this) Thanks.
 
Old 03-07-2012, 10:39 AM   #15
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,576
Blog Entries: 31

Rep: Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195
Given that the tar archive contained /home, you should have moved it to / and unpacked it. Maybe it worked OK and would have worked from anywhere because it explicitly contained /home with the leading /.

The errors could be caused by ownerships and permissions on the new files. Is your username and its group name the same on old and new computers? You could look in /etc/passwd and /etc/group to check.

Can you log in at a psuedo-terminal (accessed by Alt+Ctrl+F1 from the graphical logon screen?

If so and you create a file in /tmp and examine its username and group name, do they match what is in you new home directory? If you change to you home directory is it the expected /home/username? These commands can be used:
Code:
touch /tmp/my_test_file
/bin/ls -l /tmp/my_test_file
cd ~
cd /home/username
/bin/ls -al
The two cd comands should take you to the same directory.

This command will search for the lost directory: sudo find / -type d -iname username2
 
  


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
Slackware 13.1 huge smp is not huge cs_strong Slackware 4 11-16-2010 08:41 AM
Huge amount of "PHP Notice:" -> huge logs Braynid Linux - Software 4 03-18-2008 07:35 AM
Huge Huge Problem With Forums!!! The_Insomniac Linux - General 1 06-07-2004 09:15 AM
After Tarball then what ? sevvy8 Linux - Newbie 2 03-29-2004 04:41 AM
Tarball? HardcoreGamer Linux - Software 4 02-12-2003 03:26 PM


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