LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (https://www.linuxquestions.org/questions/debian-26/)
-   -   weird gzip behaviour? (https://www.linuxquestions.org/questions/debian-26/weird-gzip-behaviour-622766/)

vlkplk 02-21-2008 07:40 AM

weird gzip behaviour?
 
Hello!

Is it possible that after (maybe incorrect?) usage of the gzip some files, which definitely shouldn`t been touched, were changed?

Here is exactly, what I did: In Gnome user terminal, logged as user `karel` I changed to directory /var/www$ which is owned by root and looks like this
Quote:

karel@sp1-c703-028:/var/www$ ls -al


合計 20
drwxr-xr-x 5 root root 4096 2007-12-28 16:18 .
drwxr-xr-x 15 root root 4096 2007-11-16 22:34 ..
lrwxrwxrwx 1 root root 24 2007-11-16 22:09 analog -> /usr/share/analog/images
drwxr-xr-x 2 root root 4096 2008-02-19 00:01 apache2-default
drwxr-xr-x 14 karel karel 4096 2008-01-21 03:45 karel
drwxr-xr-x 14 mrtwig mrtwig 4096 2008-02-14 01:29 mrtwig
karel@sp1-c703-028:/var/www$
Than I did
Quote:

karel@sp1-c703-028:/var/www$ gzip -r karel
which packed all files and subdirectories inside directory `karel`. Now, when I unpacked them with
Quote:

karel@sp1-c703-028:/var/www$ gunzip -r karel
everything in the directory looks as before, but file `index.html` which is inside `apache2-default` directory has changed to what it has been originaly when apache was installed. Now, I`m certain that I`ve edited this file as root before and save it. But now it`s as it was originally. I`m really confused about this. If something like this is possible, is there not a chance that other files have been corrupted?

I apologize if my question is stupid and/or answer is obvious, but can someone tell me what is going on?

Thank you very much for any reply.
Karel.

pixellany 02-21-2008 08:04 AM

I very much doubt that compressing the files in directory A would change the files in directory B. It seems most likely that the other file was not saved as you thought.

Mildly off-topic, but why not:
tar -czvf karel.tar.gz karel

creates a compressed archive in one file.

vlkplk 02-21-2008 08:29 AM

Thank you very much for a quick reply, pixellany. Yes, I`m still not very friendly with the tar command...

I as well don`t think that by compressing files in one directory files in another directory can be affected. It`s possible that the change took place some time before, but I noticed it after executing the gzip and gunzip commands, when I was checking my web pages and they didn`t load as usual. Even that everything was unchanged... Is it possibly problem with some buffer or even a bug?

Anyway, I`ll let it be as many other things mysterious to me :(

Good day and thank you again.
Karel.

vlkplk 02-22-2008 03:26 AM

I`m sorry for the fuss. Apparently the file had been overwritten during last update of Apache. I`m shy that I didn`t notice that before...


All times are GMT -5. The time now is 07:57 PM.