-   Linux - General (
-   -   tar warnings (

early 01-05-2006 12:16 AM

tar warnings
I backed up my system to the second hard disc using tar -cjvf and bz2.
Got hundreds of these warnings:

tar: /sys/class/tty/tty5/dev: File shrank by 4092 bytes; padding with zeros

The backup file is OK according to the command: bunzip2 -t -v ,
but I'm curious as to what those warnings mean.
Anyone know?
Thanks in advance,

BrianK 01-05-2006 08:22 PM

I'm guessing it means the file changed size between the time you envoked the tar command and the time tar actually got to this file.

What is the purpose of your backup? Is there a reason you're backing up this tty data?

Gsidious 01-05-2006 08:57 PM

/sys is the sysfs, it is not a real filesystem that is part of your hard drive/partition. From the top of the sysfs.txt documentation:

sysfs - _The_ filesystem for exporting kernel objects.
Patrick Mochel        <>
10 January 2003
What it is:
sysfs is a ram-based filesystem initially based on ramfs. It provides
a means to export kernel data structures, their attributes, and the
linkages between them to userspace.

In short, you don't need to back up /sys or /proc as they are dynamically updated by the kernel, don't physically exist on the hard drive, and any 'files' from them could not be restored anyway. You might want to look into using the "find" command with the "-prune" option in combination with "tar" to select the files/directories to backup... (you probably want to exclude /dev as well, IMHO).

All times are GMT -5. The time now is 09:11 PM.