How Unpacking a tar.gz file in unix?

Please...help me....i know that it is no a unix forum...but i don't know how reach it....and i wish to unUnpacking a tar.gz file in unix that are some java programs....
Thanks a lot...
Mary

Depends on which unix you are talking about.
tar -zxf file works on Linux and a few other variants
If your variant cannot handle the z (zip, compressed) flag then you have to do it in two steps
gzip -d file
then
tar -xf file
Note that after the first step the file will remove the .gz extension because it has been decompressed
Cheers

Similar Messages

  • How to run a JAR file in Unix system?

    hi there
    ca anyone tell me how to run a JAR file in unix system or X window, thank you

    You want to create an executable JAR file? You do it in the following way.
    Create a manifest file such as manif.txt and the contents should contain
    Main-Class: foo
    assuming foo is the name of your main class. Then create the jar as follows
    jar cvfm foo.jar manif.txt foo.class
    I hope that helps you!
    you can find more info here http://java.sun.com/docs/books/tutorial/jar/

  • Newbie: How To find Core Dump files on Unix?!  URGENT!

    Hi, i would like to know on How To find Core Dump files on Unix?!
    I know they should be found in  /usr/sap/<SYSTEM-ID>/<INSTANZ>/work
    but there are no "core" files and also in tmp is nothing unusual but disk space is totally full.
    So how to find the big files which i could delete to make system running again?!
    can someone provide me with some infos?!
    br

    1. which user i should use to search and destroy?! root-user or SYSID-User?!
    Always use the user with the least permissions to do the job, don't use root if your sidadm can do it. If you want to find / delete SAP files use sidadm.
    2. I found no core files and the harddisk is still 100% full, what files might also cause this problem
    In your first post you wrote that /usr/sap/SID/INST/work dir is full, it is most likely that some trace files got to large. Check for files like dev_*, dew_w0 for example is the trace file of work process 0, dev_disp is the trace of the dispatcher and so on. You either have to increase the size of the filesystem, or find the cause for the growing file. It can be due to an increased trace level.
    3. What on database-side could cause this problems?! can i search for sth here.
    This does not look like a database issue so far.
    4. i was unable to use the given scripts (noob!), what can i do else?!
    Which one, please post what you typed and the error you got.
    Best regards, Michael

  • How to un tar required file?

    Hello All,
    I used TAR backup as below.
    tar -cvf test01.tar /uo1/oracle/bin/java
    its created testo1.tar file.
    Now i wanted to untar or recovery only one file instaed of whole tar file.
    for e.g: i wanted to recovery only file under bin folder callled config.
    how to un tar file?
    Any help will be appreciated. Thanks
    D

    You can look inside the tar using the 't' command:
    tar tvf file.tar And you can untar only one file with:
    frits@gateway:~/download$ mkdir t
    frits@gateway:~/download$ cd t
    frits@gateway:~/download/t$ touch a
    frits@gateway:~/download/t$ touch b
    frits@gateway:~/download/t$ tar czf ab.tgz *
    frits@gateway:~/download/t$ ls
    a  ab.tgz  b
    frits@gateway:~/download/t$ tar tzf ab.tgz
    a
    b
    frits@gateway:~/download/t$ rm a
    frits@gateway:~/download/t$ ls
    ab.tgz  b
    frits@gateway:~/download/t$ tar xzf ab.tgz a
    frits@gateway:~/download/t$ ls
    a  ab.tgz  b
    frits@gateway:~/download/t$

  • How to Run a text files using UNIX

    Hi,
    I have 10 text files in my project my task is to load all the text files data into Relational Database so i can use sql*loader to load all the text files data into a Database.
    but the thing is another project i have 200 text files so i need to run these text files using UNIX script could anyone tell me how to load all the text files using UNIX
    Thank's
    Edited by: Lavanya on Sep 5, 2012 3:09 PM

    Lavanya,
    This question relates to shell scripting and in IMO it is not an oracle question.
    I have made some initial assumptions before my proposed solution.
    PLEASE note that this is untested, but can just guide you as a template for solving your problem.
    Assuming that you have properly set up the control file and mapped each and every table in it as per the file information which you have..
    Assuming the text file to be in the format of : ------ (as suggested by other posters earlier, this file holds instructions about the file and table mapping which shall be used by your sqlldr process.)
    tmp.txt:
    text_file_1-------------should goes to----customer_info_table
    text_file_2------------should goes to------customer_address_table
    text_file_3-----------should goes to-------customer_order_table
    while read line
    do
    SQLLDR CONTROL=`echo $line | sed 's/should goes to/ /g' | sed 's/-//g' | awk -F " " '{print $1}'`.ctl,
    LOG=`echo $line | sed 's/should goes to/ /g' | sed 's/-//g' | awk -F " " '{print $1}'`.log,
    BAD=`echo $line | sed 's/should goes to/ /g' | sed 's/-//g' | awk -F " " '{print $1}'`.bad,
    DATA=`echo $line | sed 's/should goes to/ /g' | sed 's/-//g' | awk -F " " '{print $1}'`.txt
    USERID=scott/tiger
    done <tmp.txtAll I am trying to run from the above shell script is : -- PLEASE TEST it if it matches your requirement.
    SQLLDR CONTROL=text_file_1.ctl, LOG=text_file_1.log, BAD=text_file_1.bad, DATA=text_file_1.txt USERID=scott/tiger
    SQLLDR CONTROL=text_file_2.ctl, LOG=text_file_2.log, BAD=text_file_2.bad, DATA=text_file_2.txt USERID=scott/tiger
    SQLLDR CONTROL=text_file_3.ctl, LOG=text_file_3.log, BAD=text_file_3.bad, DATA=text_file_3.txt USERID=scott/tigerRepeating my assumptions, I assume you have all those files required for SQLLDR process to run (ctl file, data file...)
    Cheers,
    Manik

  • How to execute one sql file in unix

    Hi,
    I need to run the follwing script in a file in unix , then run the corresponding spooled file again
    SET echo OFF;
    SET sqlblanklines ON;
    SET feedback OFF;
    SET linesize 1500;
    SET trimspool ON;
    SET termout OFF;
    SET pagesize 0;
    spool updatedfix.sql;
    SELECT ' <update stmt>
    spool OFF;
    SET termout ON;
    SET echo ON;
    SET feedback ON;
    How can the above script in a file be executed in unix
    like
    ed script
    @ script
    then
    @ updatedfix.sql;
    plz help
    thanks

    I haven't got unix to hand but the principle is the same in windows batch files..
    c:\temp>type gen_update.sql
    set echo off
    set sqlblanklines on
    set feedback off
    set linesize 1500
    set trimspool on
    set termout off
    set pagesize 0
    spool updatedfix.sql
    select 'update emp set comm = -1 where comm is null;' from dual;
    select 'exit' from dual;
    spool off;
    set termout on
    set echo on
    set feedback on
    exit
    c:\temp>sqlplus user/pass@db @gen_update.sql
    SQL*Plus: Release 10.2.0.3.0 - Production on Wed May 6 12:25:10 2009
    Copyright (c) 1982, 2006, Oracle.  All Rights Reserved.
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With the Partitioning, OLAP and Data Mining options
    SQL> set feedback on
    SQL> exit
    Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With the Partitioning, OLAP and Data Mining options
    c:\temp>sqlplus user/pass@db @updatedfix.sql
    SQL*Plus: Release 10.2.0.3.0 - Production on Wed May 6 12:25:37 2009
    Copyright (c) 1982, 2006, Oracle.  All Rights Reserved.
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With the Partitioning, OLAP and Data Mining options
    10 rows updated.
    Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With the Partitioning, OLAP and Data Mining options
    c:\temp>Just run one after the other in the script file.

  • How to ftp and rename file in Unix

    Hi Gurus,
    I've one requirement where I need to rename the file extension to .xml and read the file.
    Here I am pasting my sample code what I've tried
    #get the file from remote server
    ftp -v -n 10.60.17.111<< EOF
    user user user
    cd /u01/oratest/gebiz_processed
    lcd /usr/tmp
    bi
    get GEBIZ_ACS_RPO000*.ACK
    #mdelete $file
    #mv GEBIZ_ACS_RPO000*.* /u01/appltest
    #get GEBIZ_SUPP.xml
    bye
    EOF
    echo
    cd /u01/oratest/gebiz_processed
    file =$(ls -rt GEBIZ_ACS_RPO000*.ACK | tail -1)
    if [ -r "$file" ];
    then
    #HERE ONLY I NEED TO RENAME THE ABOVE .ACK EXTENSION TO .XML
    a_file=$(basename $file .ack)
    b_file="'$file'"
    c_file=$file
    echo "Filename: $a_file $b_file" && echo
    output=`sqlplus -s /nolog <<-EOT
    set pages 0 feed off
    whenever sqlerror exit failure;
    connect xgbzprod/xgbzprod
    exec XGBZ_GLSEGM_XMLTAG_PROC($b_file);
    `
    echo $output
    mv $c_file /u01/oratest/gebiz_inbound
    fi
    This is my whole script, Steps in this I am performing like :
    1> Get the file from another server where the full file name I don't have, since it is suffixed with timestamp, so I called this one like this GEBIZ_ACS_RPO000*.ACK
    2> During FTP time, once I copy to my server then I need to delete file GEBIZ_ACS_RPO000*.ACK on that server, I've full permission. How to write that one.
    3> Then inside my server I need to change GEBIZ_ACS_RPO000*.ACK to GEBIZ_ACS_RPO000*.XML. How can I write this.
    4> Changed extension file name I need to pass in my pl/sql script for processing, which I am taking care.
    5> Inside GEBIZ_ACS_RPO000*.ACK, I've xml data only. So I need to change extension of the file to GEBIZ_ACS_RPO000*.XML
    I tried to write like above mentioned but I am not getting successful and more over I am not able to rename the file. I know
    with command
    mv GEBIZ_ACS_RPO000*.ACK GEBIZ_ACS_RPO000*.xml
    I can do that but I want it in program way.
    Gurus, please help me how to write those steps, and correct me if I am doing wrong above.
    Thanks in advance for your help.
    Regards
    Nagendra
    Edited by: 838961 on Mar 30, 2011 12:22 AM

    I'd do something like this:
    cd /var/tmp
    if !wget -c --user=theuser:thepassword 'ftp://10.60.17.111/u01/oratest/gebiz_processed/GERBIZ_ACS_RPO00*.ACK'; then
        echo "FTP fetching failed.' >&2
    fi
    for fn in GERBIZ_ACS_PRO00*.ACK; do
        new=$(basename "${fn}" .ack).xml
        mv "${fn}" "${new}"
        sqlplus -s /nolog <<-EOF
            set pages 0 feed off
            whenever sqlerror exit failure;
            connect xgbzprod/xgbzprod
            exec XGBZ_GLSEGM_XMLTAG_PROC('${new}');
        EOF
        mv "${new}" /u01/oratest/gebiz_inbound
    done
    {code}                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • HOW TO INSTALL TAR.GZ FILE ON LINUX MINT WHICH USES RPM TO INSTALL SOFTWARES??? :(((((((

    help me with this probelm as i am new to linux mint

    All Oracle development, coding, testing, documentation, certification and support experience for Oracle on OEL is based upon a "default-RPMs" installation
    See Metalink Note:401167.1.
    Message was edited by:
    steeveb

  • Sample code to read a text file from UNIX directory.

    I am using 9i Developer Suite, application server is 9.0.4. I want some help on how to read a flat file from UNIX environment. A sample code could be very helpful.
    In windows, i use this kind of code:-
    I declare an object & then write to a file using these sample staements:-
    file_handle text_io.file_type;
    filename := 'd:\ran\egs\uninvoiced.txt';
    file_handle:=text_io.fopen(filename,'w');
    text_io.put_line(file_handle, 'MOBILE NO '||'COUPON NO ' || 'DATE');
    I hope, my question is clear. Please help in solving the doubt.
    Regards.

    filename := 'd:\ran\egs\uninvoiced.txt';This is a Windows directory, so it won't work on Unix.
    For the rest of the code: see examples in the Forms Builder Online Help.

  • How to delete string or line from unix file(dataset) of application server

    Hi  All,
    After transfer workarea information or all records into dataset(unix file). When I see the file in application server automatically the last line is shown a blank line. I am not passing any blank line.
    I have tried for single record than also the file generates the last line(2nd line) also a blank line.
    When I m reading the dataset, it is not reading the last blank line but why it is showing the last blank line?
    How to delete string or line from unix file(dataset) of application server?
    Please give your comments to resolve this.
    Thanks
    Tirumula Rao Chinni

    Hi Rio,
    I faced similar kind of issue working with files on UNIX platform.
    The line is a line feed to remove it use
    DATA : lv_carr_linefd TYPE abap_cr_lf VALUE cl_abap_char_utilities=>cr_lf. 
      DATA : lv_carr_return TYPE char1,                                   
             lv_line_feed   TYPE char1.                                          
      lv_line_feed   = lv_carr_linefd(1).
      lv_carr_return = lv_carr_linefd+1(1).
    Note: IMP: The character in ' ' is not space but is a special
    character set by pressing ALT and +255 simultaneosly
      REPLACE ALL OCCURRENCES OF lv_line_feed IN l_string WITH ' '.
      REPLACE ALL OCCURRENCES OF lv_carr_return IN l_string WITH ' '.

  • How can I open and print a unix E....le file

    how can I open and print a unix E...le file

    We have no idea what you're referring to. If you know how to use Terminal and the file has been compiled then it may run.

  • DATA TRANSFER - How to get a SINGLE SPACE in downloaded txt file from UNIX?

    Hi Experts,
    Am sending data from SAP to UNIX/ Application server and text file on desk top as well.
    So, I am keeping a single character just SPACE at the END of each record.
    Then, When I see the downloaded text file, I found a SINGLE SPACE at the end of each record, fine.
    Then, by using CG3Y t code, I downloaded the UNIX file to my desk top.
    But, When I see this UNIX downloaded file from UNIX, I did NOT find any SPACE at the end of each record!!!
    Am doing every thing same in both cases.
    So,
    1 - Why its happening in case of UNIX file?
    2 - How to get a SINGLE SPACE  at the END in the downloaded file from UNIX?
    thanq

    Its there, I am talking abut this -
    OPEN DATASET - linefeed
    Syntax
    ... WITH { NATIVE
             | SMART
             | UNIX
             | WINDOWS } LINEFEED ... .
    Alternatives:
    1. ... WITH NATIVE LINEFEED
    2. ... WITH SMART LINEFEED
    3. ... WITH UNIX LINEFEED
    4. ... WITH WINDOWS LINEFEED
    Effect
    : These additions determine which line end marker is used for text files or legacy text files. If these additions are used, the profile parameter abap/NTfmode is ignored. Simultaneous specification of the values "UNIX" or "NT" in the addition TYPE is not permitted.
    If these additions are not used, the line end marker is determined as follows, depending on the operating system of the current application server:
    The line end marker for Unix is "LF". Under Unix, OS390 and OS400, only "LF" is used for reading and writing.
    The line end marker for MS Windows is "CRLF". Under MS Windows, however, the values of the profile parameter abap/NTfmode can also be used to set whether new files are handled according to Unix conventions or Windows conventions. If the profile parameter has the value "b", the Unix line end marker "LF" is used. If the profile parameter has the value "t" or is initial, the Windows line end marker "CRLF" is used. The setting using the profile parameter can be overridden with the addition TYPE and the value "UNIX" or "NT". If an existing file is opened without the addition TYPE, this is searched for the first line end marker ("LF" or "CRLF"), and this is used for the whole file. If no line end marker is found, the profile parameter is used. This applies particularly if an existing file is completely overwritten with FOR OUTPUT.
    If an addition WITH NATIVE|SMART|UNIX|WINDOWS LINEFEED is used, this setting can be changed for the open file using the statement SET DATASET. If neither of the additions is used, the line end marker also cannot be changed using SET DATASET.
    Notes
    : Without the use of an addition WITH LINEFEED, the line end marker is dependent on diverse implicit factors such as the operating system of the application server, a profile parameter, and line end markings that are already used. For this reason, the explicit use of WITH LINEFEED is recommended, which renders the use of the addition TYPE for setting the line end marker obsolete.
    The line end marker that is currently used can be determined for every open file using GET DATASET.
    Alternative 1
    ... WITH NATIVE LINEFEED
    Effect
    : This addition defines the line end marker independently of the access type according to the operating system of the application server, i.e. "LF" for Unix OS390 or OS400, and "CRLF" for MS Windows.
    The line end marker is interpreted according to the current codepage. If a code page is explicitly specified using the addition CODE PAGE, the characters of the line end marker must exist be available or be written in accordance with this code page.
    Note
    : The addition WITH NATIVE LINEFEED is intended for editing files on an application server that can also be accessed by other means. The addition receives the appropriate line end marker without the program needing to know the operating system.
    Alternative 2
    ... WITH SMART LINEFEED
    Effect
    : This addition depends on the access type:
    In files that are opened for reading using FOR INPUT, both "LF" and "CRLF are interpreted as a line end marker. When opening an EBCDIC file with the addition CODEPAGE, in addition to "LF", "CRLF", and the EBCDIC character strings, the corresponding ASCII character strings are also recognized. In addition, the EBCDIC character "NL" (line separator) is also interpreted as a line end marker.
    In files opened for appending or changing with FOR APPENDING or FOR UPDATE, the program searches for a line end marker that is already used in the file. In this process, first the end of the file is identified. If no line end marker is found there, a certain number of characters at the beginning is analyzed. If a line end marker is found, this is used when writing to the file. This is also affected by the addition CODE PAGE. For example, ASCII line end markers are recognized and used in a file opened with EBCDIC, but not the other way round. If no line end marker is found or no search is possible (for example, if the file is opened with the addition FILTER), the line end marker is determined according to the operating system of the application server, as with the addition WITH NATIVE LINEFEED.
    In files opened for writing using FOR OUTPUT, the line end marker is determined according the operating system of the application server, as with the addition WITH NATIVE LINEFEED.
    Note
    : The addition WITH SMART LINEFEED is intended for the generic editing of files in heterogeneous environments. The line end marker is recognized and set for different formats. The use of this addition is the best solution for most application cases.
    Alternative 3
    ... WITH UNIX LINEFEED
    Effect
    : The line end marker is set to "LF" regardless of the access type and operating system of the application server.
    The line end marker is interpreted according to the current code page. If a code page is specified explicitly using the addition CODE PAGE, the characters of the line end marker must be available or be written according to this code page.
    Note
    : The addition WITH UNIX LINEFEED is intended for editing Unix files in which the specific line end markers are to be retained, even if the operating system of the current application server is MS Windows.
    Alternative 4
    ... WITH WINDOWS LINEFEED
    Effect
    : The line end marker is set to "CRLF" regardless of the access type and operating system of the application server.
    The line end marker is interpreted according to the current code page. If a code page is specified explicitly using the addition CODE PAGE, the characters of the line end marker must be available and be written according to this code page.
    Note
    : The addition WITH WINDOWS LINEFEED is intended for use with MS Windows files in which the specific line end marker is to be retained, even if the operating system of the current application server is Unix, OS390 or OS400.

  • DATA TRANSFER - How to get a SINGLE SPACE in the downloaded file from UNIX?

    Hi Experts,
    Am sending data from SAP to UNIX/ Application server and text file on desk top as well.
    So, I am keeping a single character just SPACE at the END of each record.
    Then, When I see the downloaded text file, I found a SINGLE SPACE at the end of each record, fine.
    Then, by using CG3Y t code, I downloaded the UNIX file to my desk top.
    But, When I see this UNIX downloaded file from UNIX, I did NOT find any SPACE at the end of each record!!!
    Am doing every thing same in both cases.
    So,
    1 - Why its happening in case of UNIX file?
    2 - How to get a SINGLE SPACE  at the END in the downloaded file from UNIX?
    thanq

    Hi,
    I don't know if this works:
    perform SET_TRAIL_BLANKS(saplgrap) using 'X'.  
    perform SET_FIXLEN(saplgrap) using '0' '060'.   "put length of your line from-to
    ... download ...
    It will put space at the end of your line, according to the length.
    Hope it works,
    Chang

  • How to create pdf files in UNIX directory from oracle reports

    I would like to know how to create pdf files in UNIX directory from oracle reports.
    Thanks,

    Please make your question more clear . Also mention the reports version.
    1) If you are runnning reports in Unix, you can give
    .... destype=file desformat=pdf desname=<filename>
    in command line
    Please refer docs below.
    2) If by your question you mean
    "My reports server is running in Windows but I want to ftp my files to Unix after creating it"
    then the answer is that you can use pluggable destination "ftp"
    .... destype=ftp desformat=pdf desname=<ftp url>
    Pluggable destinations download
    http://otn.oracle.com/products/reports/pluginxchange/index.html
    Thanks
    Ratheesh
    [    All Docs     ]
    http://otn.oracle.com/documentation/reports.html
    [     Publishing reports to web  - 10G  ]
    http://download.oracle.com/docs/html/B10314_01/toc.htm (html)
    http://download.oracle.com/docs/pdf/B10314_01.pdf (pdf)
    [   Building reports  - 10G ]
    http://download.oracle.com/docs/pdf/B10602_01.pdf (pdf)
    http://download.oracle.com/docs/html/B10602_01/toc.htm (html)
    [   Forms Reports Integration whitepaper  9i ]
    http://otn.oracle.com/products/forms/pdf/frm9isrw9i.pdf

  • HT2128 How do I recover old files that are labeled "Unix Executable File?"

    Some files that were transfered from and older mac are labeled "Unix Executable File."  How do I resd these files?

    There is a terminal command called file which will give you a hint of what the file is.
    /Appliactions/Utilities/Terminal
    me ~$ file pki
    pki: directory
    me ~$ file pulse-cookie
    pulse-cookie: data
    type file space drag & drop the file onto the terminal, press return.
    Robert

Maybe you are looking for

  • Help needed in getting computer to recognise kindle

    Our library (Liverpool (UK)) has just started using Adobe Digital Edition so that ereaders can read loaned e-books. My Toshiba laptop has the software installed and authorised but although the laptop recognises my Kindle paperwhite it does not appear

  • Bridge CS5 file associations not correct...

    When I try to open an office 2007 document, the default application is set to Thunderbird and when I try to edit it in the Edit>Preverences>File Type Associations, it isn't listed at all. My OS default applicaions for Office 2007 files are all correc

  • Problem with Drill down reports demo

    Hi, Did somebody successfully installed the drill down demo. I am not able to get the results here getting some javascript error "object expected". I have created a schema, also the cgicmd.dat report variables attahced the rep_util file. I could see

  • Z2 Tablet LTE - 2 questions?!

    basically I bought a Z2 LTE Tablet 2nd hand from my local cash converters, will this be under warranty if something breaks? and: I have android L on my device, 5.0.2 but according to your site: Latest available software: 23.1.A.1.28 there's a new upd

  • FOREFRONT TMG 2010 CRITICAL ISSUES

    Dear all, I installed and configured the Microsoft Forefront TMG in my company's network. It's been done two weeks ago. Since then, everything is working fine and all intranet computers have worked well. This is a two NIC server (LAN and WAN on the s