Sponsored Content
Operating Systems Solaris gzip a file and append creation date stamp to file Post 302355202 by jlliagre on Tuesday 22nd of September 2009 03:21:10 AM
Old 09-22-2009
I believe the OP is really looking for something like:
Code:
zip archive-$(date +"%Y%m%d%H%M%S").zip someFile

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

File date and time stamp

I have to capture the creation date and time stamp for a file. The ls command doesn't list all the required information. I need year, month, day, hour, minute and second. Any ideas... (1 Reply)
Discussion started by: Xenon
1 Replies

2. Shell Programming and Scripting

creating a new file with date stamp

Hi, can any one tell me how to achieve this...I will input the path and file name and it should rename it to current date and time... this is what I tried... #! /usr/bin/sh set -x cd /info_stg/vul/Scripts TODAY_DATE_TIME=`date +%Y%m%d%H%M%S` IN_FILE_PATH=`cat file.txt | awk -F, '{... (2 Replies)
Discussion started by: mgirinath
2 Replies

3. Shell Programming and Scripting

Date Stamp on new file

Dear Gurus, I'm trying to move a number of files from one directory to another directory with a new date stamp. This is my script: #! /bin/csh Today_Date=`date +%Y%M%D` mv /usr/TRS/data/TS* /usr/TRS/backup/TS*.${Today_Date} when i run the script i'm getting the following errors: mv:... (14 Replies)
Discussion started by: lweegp
14 Replies

4. UNIX for Dummies Questions & Answers

Changing Creation Date to a Prespecified Date of a File In Unix

Dear Expert, Is there a command to do that in Unix? In such a way that we don't need to actually "write" or modified the content. -- monkfan (4 Replies)
Discussion started by: monkfan
4 Replies

5. Shell Programming and Scripting

append date time stamp via ftp script

I have searched several thread and not found my solution, so I am posting a new qustion. I have a very simple script on an AIX server that FTPs 2 files to a MS FTP server. These 2 files are created on the AIX server every hour, with a static name. I need to FTP the files to the MS server, but... (1 Reply)
Discussion started by: sknisely
1 Replies

6. Shell Programming and Scripting

Help with creating a text file in perl with file creation date.

Hi, I am quite new to Perl scripting and i need to create a .TXT file using perl, with fields (A,B,C,D,E), and this text file should be named with current file creation date "XYZ_CCYYMMDD.TXT" (i.e.XYZ_2011042514:33 PM). Can anyone who has done this, please share their expertise on this... (5 Replies)
Discussion started by: msrahman
5 Replies

7. Emergency UNIX and Linux Support

How to append date and time stamp before the two extensions?

hi, i have some file names. my file names are as follows: c_abc_new.txt.xls c_def.txt.xls i want to append date time stamp in the below manner. c_abc_new_YYYYMMDD_HH24MISS.txt.xls c_def_YYYYMMDD_HH24MISS.txt.xls check the two input file names, they differ in naming. the 1st file name... (9 Replies)
Discussion started by: Little
9 Replies

8. Shell Programming and Scripting

Perl:Script to append date and time stamp

Help with Perl script : I have a web.xml file with a line <display-name>some_text_here</display-name> Need to append the current date and time stamp to the string and save the XML file Something like <display-name>some_text_here._01_23_2014_03_56_33</display-name> -->Finally want... (5 Replies)
Discussion started by: gaurav99
5 Replies

9. Shell Programming and Scripting

Want it to read the file name and then append date stamp at the end of file?

I was thinking something like for i in `find . -name "*.log.Z"`; do mv $i name.log.Z or something like that? (3 Replies)
Discussion started by: xgringo
3 Replies

10. Shell Programming and Scripting

How to print the specific part of the file name with file creation date?

Hello Folks, I have an requirement, where i need to get total count of the file based on creation date with there filename selected pattern. Filename: MobileProtocol.20171228T154200.157115.udr I want to get the count of files created on each day based on a pattern find. find . -type... (7 Replies)
Discussion started by: sadique.manzar
7 Replies
GZNEW(1)						      General Commands Manual							  GZNEW(1)

NAME
gznew - recompress .Z files to .gz files SYNOPSIS
gznew [ -ftv9PK] [ name.Z ... ] DESCRIPTION
gznew recompresses files from .Z (compress) format to .gz (gzip) format. If you want to recompress a file already in gzip format, rename the file to force a .Z extension then apply gznew. OPTIONS
-f Force recompression from .Z to .gz format even if a .gz file already exists. -t Tests the new files before deleting originals. -v Verbose. Display the name and percentage reduction for each file compressed. -9 Use the slowest compression method (optimal compression). -P Use pipes for the conversion to reduce disk space usage. -K Keep a .Z file when it is smaller than the .gz file SEE ALSO
gzip(1), gzmore(1), gzdiff(1), gzgrep(1), gzforce(1), gzexe(1), compress(1) BUGS
gznew does not maintain the time stamp with the -P option if cpmod(1) is not available and touch(1) does not support the -r option. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +--------------------+-----------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +--------------------+-----------------+ |Availability | SUNWgzip | +--------------------+-----------------+ |Interface Stability | External | +--------------------+-----------------+ NOTES
Source for gzip is available in the SUNWgzipS package. GZNEW(1)
All times are GMT -4. The time now is 09:11 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy