I am really dummy at unix so I really go with single line commands. I use this commands in the IBM ETL tool.
I do not know how to use
is i the file name?
like
for filename in filepath ? I have to define the variables right?
I generally prefer "readable" to "fits on one line", but if you want a single line UNIX command, here it is:
Type this command into your shell (assuming that you use a POSIX compatible shell such as ksh, or bash) in the directory (AKA folder) where you have placed the zip files. The shell will execute a loop of commands once for each zip file in that directory setting the shell variable i to the pathname of one of your zip files. In the loop it will use the unzip utility to extract all of the files in that zip file, and then, if and only if it successfully extracts all of the files in the zip file, it will then remove the zip file.
I am really dummy at unix so I really go with single line commands.
The difference between single line commands and multiple line commands is the return key. Cramming it all on one line for no reason just makes it harder.
Hi frnds,
My requirement is I have a zip file with name say eg: test_ABC_UH_ccde2a_awdeaea_20150422.zip
within that there are subdirectories on each directory we again have .zip files and in that we have files like mama20150422.gz and so on.
Iam in need of a bash script so that it unzips... (0 Replies)
Hi all,
I have a many folders with zipped files in them. The zipped files are txt files from different folders. The txt files have the same names. If i try to
find . -type f -name "*.zip" -exec cp -R {} /myhome/ZIP \; it fails since the ZIP files from different folders have the same names and... (2 Replies)
I have .zip file, i want to list all the files archived in the zip file. unzip utility is not working for me in unix.
Please help me resolve this issue
Thanks
ganesh. (3 Replies)
Hi,
I need to zip/compress a data file and send to a vendor. The vendor does have only unzip utility and can accept only .ZIP files. I do not have zip utility in my server.
How do I zip/compress the file so that it can be deflated using unzip command ? I tried gzip & compress commands, but... (1 Reply)
Hi All
I have ftped a .ZIP file (zipped using WinZip in Windows) to my Unix server (HP-UX).
I don't have unzip cmd available in my curent Unix version
Please let me know any cmd in UNIX (other than unzip) using which I can unzip this .ZIP file .
Please elaborate on the commands aval and... (5 Replies)
hi ,
I am using this command to unzip files from a source
unzip -o $source_dir -d $dest_dir
butthe problem is that this command creates a new folder at the destination and unzips all the files in that folder.
I dont want that extra folder.
e.g
source_dir= abc/myname.zip... (2 Replies)
Hello experts,
I run Solaris 9. I have a below script which is used for gunzip the thousand files from a directory.
----
#!/usr/bin/sh
cd /home/thousands/gzipfiles/
for i in `ls -1`
do
gunzip -c $i > /path/to/file/$i
done
----
In my SAME directory there thousand of GZIP file and also... (4 Replies)
Hi All
I have ftped a .ZIP file (zipped using WinZip in Windows) to my Unix server (HP-UX).
I don't have unzip cmd available in my curent Unix version
Please let me know any cmd in UNIX (other than unzip) using which I can unzip this .ZIP file .
Please elaborate on the commands aval and... (5 Replies)
Hi,
I've just installed solaris 9 onto a SPARC box and am connecting to the machine via a console cable using hyper terminal. Unfortunately i have not got a monitor so i'm having to do all my config using the command line (which i'm no good at)
I'm trying to copy a patch cluster (ZIP) file... (1 Reply)