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(1F) FMLI Commands test(1F)
NAME
test - condition evaluation command
SYNOPSIS
test expression
expression
DESCRIPTION
test evaluates the expression expression and if its value is true, sets a 0 (TRUE) exit status; otherwise, a non-zero (FALSE) exit status
is set; test also sets a non-zero exit status if there are no arguments. When permissions are tested, the effective user ID of the process
is used.
All operators, flags, and brackets (brackets used as shown in the second SYNOPSIS line) must be separate arguments to test. Normally these
items are separated by spaces.
USAGE
Primitives
The following primitives are used to construct expression:
-r filename True if filename exists and is readable.
-w filename True if filename exists and is writable.
-x filename True if filename exists and is executable.
-f filename True if filename exists and is a regular file.
-d filename True if filename exists and is a directory.
-c filename True if filename exists and is a character special file.
-b filename True if filename exists and is a block special file.
-p filename True if filename exists and is a named pipe (FIFO).
-u filename True if filename exists and its set-user-ID bit is set.
-g filename True if filename exists and its set-group-ID bit is set.
-k filename True if filename exists and its sticky bit is set.
-s filename True if filename exists and has a size greater than 0.
-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 0.
-n s1 True if the length of the string s1 is non-zero.
s1 = s2 True if strings s1 and s2 are identical.
s1 != s2 True if strings s1 and s2 are not identical.
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, and -le may be used in
place of -eq.
Operators
These primaries may be combined with the following operators:
! Unary negation operator.
-a Binary and operator.
-o Binary or operator (-a has higher precedence than -o).
`(expression)` Parentheses for grouping. Notice also that parentheses are meaningful to the shell and, therefore, must be quoted.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWcsu |
+-----------------------------+-----------------------------+
SEE ALSO
find(1), sh(1), attributes(5)
NOTES
If you test a file you own (the -r , -w , or -x tests), but the permission tested does not have the owner bit set, a non-zero (false) exit
status will be returned even though the file may have the group or other bit set for that permission. The correct exit status will be set
if you are super-user.
The = and != operators have a higher precedence than the -r through -n operators, and = and != always expect arguments; therefore, = and !=
cannot be used with the -r through -n operators.
If more than one argument follows the -r through -n operators, only the first argument is examined; the others are ignored, unless a -a or
a -o is the second argument.
SunOS 5.11 5 Jul 1990 test(1F)