It depends: the file command on Solaris and Linux will tell you if a file is compressed with either zip, gzip, or compress. On HPUX 10.2 the file command could not do that.
Is there a way I can check if a file is comppressed or not? (Be it tar/gzip or compress). trying to write a generic housekeeping scrit that will delete files over 6 months old and compress any uncompressed files if less than 6 months old. But not sure if there is a clever way to check except for... (4 Replies)
Hi guys i had a script which will generate a log file.Is there any commands to check the dynamic changes in the log file,i.e if i open the log file i should able to see the updating changes live...I hope u understand my query... (2 Replies)
I simply need to compress all files in a directory that are not already compressed and that are older than 10 days?
I have this so far. I need to add to this so I don't try and compress file that are already compressed. Or if you think this can be simplified let me know. Thx.
find... (3 Replies)
Hi all,
Can you guys please help me with this...
I am on AIX and need to prepare a script which will
1. check for a file named do_backup in the current file system
2. If the file exists i need to run some commands and exit, if the file doesn't exist then sleep for 15 mins and try... (2 Replies)
Advance Thanks.
(1) I would like to know any unix/Linux command to check EOF char in a file.
(2) Or Any way I can check a file has been reached completely at machine B from machine A. Note that machine A ftp/scp the file to machine B at unknown time. (5 Replies)
Hi All
I have written the following script:
#!/bin/ksh
while read cmdline
do
echo `$cmdline`
pid="$cmdline"
done<commands.txt
===========
commands.txt contains:
ps -ef | grep abc | grep xyz |awk '{print $2};
My objective is to store the o/p of the command in a variable and do... (8 Replies)
Need unix commands to delete records from one file if the same record present in another file...
just like join ... if the record present in both files.. delete from first file or delete the particular record and write the unmatched records to new file..
tried with grep and while... (6 Replies)
I'm confusing with this question. :wall: Can any one tell me how to do and use which command? :confused:
create a compressed archive of the "Test" directory and it's contents, called Test.tar.gz, and place it in the current directory. Use a non-verbose tar command with a single string, including... (5 Replies)
Hi Experts,
Can some one let me know the FTP commands to check the file status i.e i want to check whether my files are locked or in open status.
I am connecting FTP from local machine.
Regards,
Spidy (1 Reply)
Discussion started by: spidy
1 Replies
LEARN ABOUT FREEBSD
archive_write_add_filter_lzip
ARCHIVE_WRITE_FILTER(3) BSD Library Functions Manual ARCHIVE_WRITE_FILTER(3)NAME
archive_write_add_filter_bzip2, archive_write_add_filter_compress, archive_write_add_filter_gzip, archive_write_add_filter_lzip,
archive_write_add_filter_lzma, archive_write_add_filter_none, archive_write_add_filter_program, archive_write_add_filter_xz
LIBRARY
Streaming Archive Library (libarchive, -larchive)
SYNOPSIS
#include <archive.h>
int
archive_write_add_filter_bzip2(struct archive *);
int
archive_write_add_filter_compress(struct archive *);
int
archive_write_add_filter_gzip(struct archive *);
int
archive_write_add_filter_lzip(struct archive *);
int
archive_write_add_filter_lzma(struct archive *);
int
archive_write_add_filter_none(struct archive *);
int
archive_write_add_filter_program(struct archive *, const char * cmd);
int
archive_write_add_filter_xz(struct archive *);
DESCRIPTION
archive_write_add_filter_bzip2(), archive_write_add_filter_compress(), archive_write_add_filter_gzip(), archive_write_add_filter_lzip(),
archive_write_add_filter_lzma(), archive_write_add_filter_xz(),
The resulting archive will be compressed as specified. Note that the compressed output is always properly blocked.
archive_write_add_filter_none()
This is never necessary. It is provided only for backwards compatibility.
archive_write_add_filter_program()
The archive will be fed into the specified compression program. The output of that program is blocked and written to the client
write callbacks.
RETURN VALUES
These functions return ARCHIVE_OK on success, or ARCHIVE_FATAL.
ERRORS
Detailed error codes and textual descriptions are available from the archive_errno() and archive_error_string() functions.
SEE ALSO tar(1), libarchive(3), archive_write(3), archive_write_format(3), archive_write_set_options(3), cpio(5), mtree(5), tar(5)BSD February 2, 2012 BSD