Results 1 to 4 of 4
- 04-16-2010, 10:16 AM #1
Member
- Join Date
- Mar 2010
- Posts
- 4
- Rep Power
- 0
- 04-16-2010, 10:32 AM #2
the examples from the man tar on AIX
to build the gz enter gzip yourtar.tarJava Code:Examples 1 To write the file1 and file2 files to a new archive on the default tape drive, enter: tar -c file1 file2 2 To extract all files in the /tmp directory from the archive file on the /dev/rmt2 tape device and use the time of extraction as the modification time, enter: tar -xm -f/dev/rmt2 /tmp 3 To create a new archive file that contains the file1 file and pass the archive file to the dd command to be written to the /dev/rmt1 device, enter: tar -cvf - file1 | dd of=/dev/rmt1 conv=sync 4 To display the names of the files in the out.tar disk archive file on the current directory, enter: tar -vtf out.tar 5 To expand the compressed tar archive file, fil.tar.z, pass the file to the tar command, and extract all files from the expanded tar archive file, enter: zcat fil.tar.Z | tar -xvf - 6 To archive the contents of /usr/include and /usr/bin files using short relative path names, enter: cd /usr tar -cvf/dev/rmt0 -C./include . -C ../bin . 7 To archive to an 8-mm device when using the -S flag, enter: tar -cvf /dev/rmt0 -S 4800000b /usr Note: When archiving to an 8-mm device, the -S Feet and -S Feet@Density flags are not recommended, since the 8-mm device does not use the concept of density when writing to a tape. 8 To archive a list of all C files that is listed in the file through the InputList argument of the -L option, enter: tar -cvf fl.tar -L fl_list Where fl_list is a file consisting a list of all .c files in it. This can be obtained as follows: ls *.c > fl_list 9 To archive a list of all C files by setting a variable using the -L option, enter: ls *.c > fl_list fl=fl_list tar -cvf var.tar -L $fl 10 To avoid the truncation of long user or group names during creation of the archive, enter: tar -cvEf file.tar file 11 To create a new archive file that contains the file1 file with ACL and EA, enter: tar -cvUf /tmp/tar.ar file1Last edited by j2me64; 04-16-2010 at 10:37 AM.
- 04-16-2010, 10:49 AM #3
Member
- Join Date
- Mar 2010
- Posts
- 4
- Rep Power
- 0
Hi J2me64,
Thanks for the response.
But i need to do this through code in java lanuage.
i want some java code example to achieve this.
- 04-16-2010, 11:22 AM #4
Similar Threads
-
Probelm reading text file from unix
By manik in forum NetworkingReplies: 2Last Post: 12-24-2009, 07:28 AM -
Create an executeable file for java
By cowboy in forum New To JavaReplies: 14Last Post: 11-03-2009, 11:30 PM -
How do i create a help file in java for the users of my application
By Manfizy in forum New To JavaReplies: 5Last Post: 08-25-2009, 08:43 AM -
How to create exe file in java
By radix in forum New To JavaReplies: 8Last Post: 11-06-2008, 04:17 PM -
Filter a file in java (unix cut command equivalent)
By marcosabel in forum New To JavaReplies: 0Last Post: 02-11-2008, 07:26 PM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks