10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi all i am very new to shell scripting and need some help from you to learn
1)i have some log files that gets generated on daily basis example: i have abc_2017_01_30_1.log ,2017_01_30_2.log like wise so i want to zip this 4 logs which are created on same date into one zip folder.
2)Post zipping... (1 Reply)
Discussion started by: b.saipriyanka
1 Replies
2. UNIX for Beginners Questions & Answers
Hi all i am very new to shell scripting and need some help from you to learn
1)i have some log files that gets generated on daily basis example: i have abc_2017_01_30_1.log ,2017_01_30_2.log like wise so i want to zip this 4 logs which are created on same date into one zip folder.
2)Post zipping... (2 Replies)
Discussion started by: b.saipriyanka
2 Replies
3. Shell Programming and Scripting
Hi
I have a requirement in unix shell where I need to zip multiple files on server to one single .zip file. I dont see zip command in AIX and gzip command not doing completely what I want.
One I do .zip file, I should be able to unzip in my local Computer.
Here is example what I want... (9 Replies)
Discussion started by: RAMA PULI
9 Replies
4. Ubuntu
I tried to untar a file, test123.tar.gz by doing :
tar -zxvf test123.tar.gz
but got the following error msg:
gzip: stdin: not in gzip format
tar: Child returned status 1
tar: Exiting with failure status due to previous errors
What do i do now? Pl Suggest
Thanks (3 Replies)
Discussion started by: DCH
3 Replies
5. UNIX for Dummies Questions & Answers
Hi,
I need to zip a .dat file with .zip extension. I tried using the "zip" command. But shell says. "ksh: zip: not found"
Currently I am using gunzip to zip and changing the extension ".gz" to ".zip" as follows.
mv $file `echo $file | sed 's/\(.*\.\)gz/\1zip/'`
But when I tried... (1 Reply)
Discussion started by: aeroticman
1 Replies
6. AIX
I have to zip many pdf files and the size of zip file must not exceed 200 MB. When size is more than 200 MB then multiple zip files needs to be created.
How we can achieve this in UNIX?
I have tried ZIP utility but it takes a lot of time when we add individual pdfs by looping through a... (1 Reply)
Discussion started by: tom007
1 Replies
7. UNIX for Dummies Questions & Answers
Hello,
I am trying to return the name of the resulting file from a .zip archive file using unix unzip command.
unzip c07212007.cef7081.zip
Archive: c07212007.cef7081.zip
SecureZIP for z/OS by PKWARE
inflating: CEP/CEM7080/PPVBILL/PASS/G0063V00
I used the following command to unzip in... (5 Replies)
Discussion started by: oracledev
5 Replies
8. UNIX for Dummies Questions & Answers
Hi all, dummy here.... I have major errors on entering the shell. On login I get:
-bash: dircolors: command not found
-bash: tr: command not found
-bash: fgrep: command not found
-bash: grep: command not found
-bash: grep: command not found
-bash: id: command not found
-bash: [: =: unary... (12 Replies)
Discussion started by: wcmmlynn
12 Replies
9. AIX
$ errpt | more
IDENTIFIER TIMESTAMP T C RESOURCE_NAME DESCRIPTION
3074FEB7 0802050205 T H fscsi1 ADAPTER ERROR
B8113DD1 0802050205 T H fcs1 LINK ERROR
B8113DD1 0802050205 T H fcs1 LINK ERROR
3074FEB7 0802050205 T H fscsi0 ADAPTER ERROR
B8113DD1 ... (2 Replies)
Discussion started by: mcastill66
2 Replies
10. UNIX for Advanced & Expert Users
$ errpt | more
IDENTIFIER TIMESTAMP T C RESOURCE_NAME DESCRIPTION
3074FEB7 0802050205 T H fscsi1 ADAPTER ERROR
B8113DD1 0802050205 T H fcs1 LINK ERROR
B8113DD1 0802050205 T H fcs1 LINK ERROR
3074FEB7 0802050205 T H fscsi0 ADAPTER ERROR
B8113DD1 ... (0 Replies)
Discussion started by: mcastill66
0 Replies
TEST(1) General Commands Manual TEST(1)
NAME
test - condition command
SYNOPSIS
test expr
DESCRIPTION
test evaluates the expression expr, and if its value is true then returns zero exit status; otherwise, a non zero exit status is returned.
test returns a non zero exit if there are no arguments.
The following primitives are used to construct expr.
-r file true if the file exists and is readable.
-w file true if the file exists and is writable.
-f file true if the file exists and is not a directory.
-d file true if the file exists and is a directory.
-s file true if the file exists and has a size greater than zero.
-t [ fildes ]
true if the open file whose file descriptor number is fildes (1 by default) is associated with a terminal device.
-z s1 true if the length of string s1 is zero.
-n s1 true if the length of the string s1 is nonzero.
s1 = s2 true if the strings s1 and s2 are equal.
s1 != s2 true if the strings s1 and s2 are not equal.
s1 true if s1 is not the null string.
n1 -eq n2
true if the integers n1 and n2 are algebraically equal. Any of the comparisons -ne, -gt, -ge, -lt, or -le may be used in place of
-eq.
These primaries may be combined with the following operators:
! unary negation operator
-a binary and operator
-o binary or operator
( expr )
parentheses for grouping.
-a has higher precedence than -o. Notice that all the operators and flags are separate arguments to test. Notice also that parentheses
are meaningful to the Shell and must be escaped.
SEE ALSO
sh(1), find(1)
TEST(1)