Because gzip saves, into the file, the modification time of the file, as well as the original file name if possible:
If it can't save the original files modification time (eg because it's being piped into gzip) it saves the creation time of the compressed file instead.
I wrote a simple program which will create a child process to execute a command and the output will be redirected to the file.
Please have a look at the following code ->
#include <stdio.h>
#include <stdlib.h>
#include <sys/stat.h>
#include <fcntl.h>
void execute(char **argv)
{
... (0 Replies)
Hi,
I have two files , one file with data file with attributes that need to be sent to another file to generate a predefined format.
Example:
File.txt
AP|{SSHA}VEEg42CNCghUnGhCVg==
APVG3|{SSHA}XK|"password"
AP3|{SSHA}XK|"This is test"
....
etc
---------
test.sh has... (1 Reply)
Can anyone tell me why does'nt the following command work?
find /gfp1/home/arijit -name "*.sas7bdat" | gzip
I am trying to compress all files with extension sas7bdat with gzip.
It gives error message
gzip: compressed data not written to a terminal. Use -f to force compression.... (5 Replies)
Hi All,
I have a random test file: test.txt, size: 146
$ ll test.txt
$ 146 test.txt
Take 1:
$ cat test.txt | gzip > test.txt.gz
$ ll test.txt.gz
$ 124 test.txt.gz
Take 2:
$ gzip test.txt
$ ll test.txt.gz
$ 133 test.txt.gz
As you can see, gzipping a file and piping into gzip... (1 Reply)
I would like to make a listing of files in a large directory and output it to tar.gz. Is it possible to do this in one command?
For example;
I would like the text output from this command to be outputted to a directory.tar.gz file.
ls -al -R /bigdir
Is it possible to do it in memory... (5 Replies)
Hi,
I am using solaris OS 10 and Bash shell.I need a script which will compare the two directories and produces the output.
Step 1: In detail say suppoose I have machine one and have a directory dir1. Script should iterate through the directories and subdirectories inside and produce the output... (10 Replies)
Dear all
I am facing issue in one part of my script.
in this part i am trying to zip the files but want the status to be redirected to a text file
YAMVASSRV02_vas>
YAMVASSRV02_vas> cat final_col.sh
gzip -cv /data01/oracle/oradata/vas/control/control01.ctl > ... (2 Replies)
When I run the awk below, I get an error message
awk -v OFS='\t' '$(NF-1)=="Benign" || ($(NF-2) OFS $(NF-1))=="Likely Benign" {$(NF)=$(NF-2) OFS $(NF-1)} {print $0 }' input
awk: cmd. line:1: (FILENAME=VUS FNR=8) fatal: attempt to access field -1
input
Chr Start End Ref ... (6 Replies)