remsh: jar -C option does not work


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting remsh: jar -C option does not work
# 1  
Old 10-07-2010
Question remsh: jar -C option does not work

Hi All,

Im trying to extract a file called 'DYEDistinctAppServer.topology' from a jar at specific location data/product/template-topologies, using remsh.

command is:

Code:
remsh $rHost -l $rUser -n 'export JAVA_HOME=/usr/java6_64_SR7; 
export ORACLE_HOME=/oravl01/oracle/11.1.0.7; 
export PATH=${ORACLE_HOME}/bin:/usr/java6_64_SR7/bin:${PATH};
jar -xvf discovery1-full-8.1.0-07-10-2010_1055.jar -C data/product/template-topologies/DYEDistinctAppServer.topology'

output:
Code:
Usage: jar {ctxui}[vfm0Me] [jar-file] [manifest-file] [entry-point] [-C dir] files ...
Options:
    -c  create new archive
    -t  list table of contents for archive
    -x  extract named (or all) files from archive
    -u  update existing archive
    -v  generate verbose output on standard output
    -f  specify archive file name
    -m  include manifest information from specified manifest file
    -e  specify application entry point for stand-alone application 
        bundled into an executable jar file
    -0  store only; use no ZIP compression
    -M  do not create a manifest file for the entries
    -i  generate index information for the specified jar files
    -C  change to the specified directory and include the following file
If any file is a directory then it is processed recursively.
The manifest file name, the archive file name and the entry point name are
specified in the same order as the 'm', 'f' and 'e' flags.
Example 1: to archive two class files into an archive called classes.jar: 
       jar cvf classes.jar Foo.class Bar.class 
Example 2: use an existing manifest file 'mymanifest' and archive all the
           files in the foo/ directory into 'classes.jar': 
       jar cvfm classes.jar mymanifest -C foo/ .

Is this a syntax error?

Thanks.
# 2  
Old 10-07-2010
Try 'echo jar' to see if it really ends up the way you thought it did.
# 3  
Old 10-07-2010
I know nothing about "jar" but the example in the "Usage:" doesn't have a leading hyphen on the parameters. Of course it may be like "tar" and have dual syntax?

Code:
jar -xvf

# 4  
Old 10-08-2010
Thank u all for the help!

I tried the above command without -C option and it worked!

But i dnt know how it succeeded?
# 5  
Old 10-09-2010
You'd check by looking to see if the file you wanted extracted was extracted... you must have some way of logging in, yes?
Login or Register to Ask a Question

Previous Thread | Next Thread

6 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Want to write all the jar name in single with delimiter ":" in beween the jar name

Hi All, I am having 7 jar files in a dir. abc like listed below bash-3.00$ cd abc bash-3.00$ ls 123.jar 23wdawd.jar dfsa23.jar dsa.jar wew234.jar adsd234234.jar dfsda423.jarNow i want to assign all this jar files to a variable in the below format ... (6 Replies)
Discussion started by: natraj005
6 Replies

2. Shell Programming and Scripting

Remsh

Hi All, Im using remsh to execute shell script on remote server. And this script gets called from another AIX server. My code is: remsh $rHost -l $rUser -n "export JAVA_HOME=/usr/java6_64_SR7; export ORACLE_HOME=/oravl01/oracle/11.1.0.7; export... (3 Replies)
Discussion started by: AB10
3 Replies

3. Shell Programming and Scripting

recently introduced to the newer option for find...does an older option exist?

To find all the files in your home directory that have been edited in some way since the last tar file, use this command: find . -newer backup.tar.gz Is anyone familiar with an older solution? looking to identify files older then 15mins across several directories. thanks, manny (2 Replies)
Discussion started by: mr_manny
2 Replies

4. UNIX for Advanced & Expert Users

remsh doesn't work

Hi, I need to use remsh inside a ksh script. The script would remsh to another machine (maybe different OS) and then execute commands. A Simple Script: #!/usr/bin/ksh remsh sun7656 -l myuser "cd /user.3/MyFolder; ls -lart" But this gives me the error: permission denied I also... (4 Replies)
Discussion started by: som.nitk
4 Replies

5. UNIX for Dummies Questions & Answers

lp -o <option> doesn't work

why lp -o <option> doesn't work on my SCO Unix. (4 Replies)
Discussion started by: wendyz
4 Replies

6. Shell Programming and Scripting

option followed by : taking next option if argument missing with getopts

Hi all, I am parsing command line options using getopts. The problem is that mandatory argument options following ":" is taking next option as argument if it is not followed by any argument. Below is the script: while getopts :hd:t:s:l:p:f: opt do case "$opt" in -h|-\?)... (2 Replies)
Discussion started by: gurukottur
2 Replies
Login or Register to Ask a Question