I'm trying to do the following within a for loop:
Find files that satisfy a condition
Echo the name of the files to a log file.
Gzip the file.
I can get the script to find the files and echo their names to the screen but cannot pipe them to a file.
(I have not got as far testing the gzip part)
Here's the relevant portion of the script (The $LOGCLEAN_FILE exists and is written to in an earlier
Hi ,
In my directory , i have many days file but i want to see all those which are of todays date.
i tried this but it gives all the files
Code:
mtime -0 |ls -ltr
I tried the below option as well.
Code:
19635 find -iname "*.LOG" -mtime
19636 ls -ltr *.LOG -mtime -1
19637 ls -ltr *.LOG mtime -0
nothing worked.
Can you suggest me how to list all the c
I would like to compress a text file using gzip command line tool while keeping the original file. By default running the following command
gzip file.txt
results in modifying this file and renaming it file.txt.gz. instead of this behavior I would like to have this new compressed file in addition to the existing one file.txt.
Hi ,
I am a newbie!!!
I want to develop a script for deleting files older than x days from multiple paths. Now I could reach upto this piece of code which deletes files older than x days from a particular path. How do I enhance it to have an input from a .txt file or a .dat file?
Hey forums,
I'm writing a back up script and I'd like to tar a directory called "/current/" and gzip it at the same time.
So far I have tried $ tar -cf <folderpath> > gzip -9 archive.tar.gz and it keeps telling me I'm cowardly trying to create a file with out a name.
Any help would be great :D
Hi All,
I'm stuck with this issue when I try to display the searched string into a compressed file.
More exactly when I run this script
Code:
for f1 in $(find dir1 -type f -print); do gunzip -c $f1 | grep -n "gio" | awk -F":" '{print $1-1 "," $1 "p"}' | xargs -i sed -n {} $f1 ; done
returns
Code:
T Š A1
T £ A
΀y£`Ã
b
I have a source file that contains multiple XML files concatenated in it. The separator string between files is <?xml version="1.0" encoding="utf-8"?>. I wanted to split files in multiple files with mentioned names. I had used a awk code earlier to spilt files in number of lines i.e.
Hi,
I want to filter the logs per domain and place it in a single text file, but I'm having a problem with "if" statement because current archiving setup where logs are compressed into two different format ( gzip and compress).
Script:
domainlist="4prd 5prd 6prd 7prd 8prd"
for domain in $domainlist
do
if [ ?
Hallo,
I've got an issue trying to decompress something that was compressed in VB.NET using Gzip.
In .NET the following occurs to an XML file:
- The file is compressed using Gzip
- The result is encrypted using Triple3DES
- The result is saved to a file
In Android, I've got the 3DES decryption working fine, which when I open a file where I only encrypted in .NET, returns the XML tha