Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa Java-Beginners tar directory and subdirectories

Have Programming Question? Ask it here!
 
 
 


Deepak Kumar
tar directory and subdirectories
1 Answer(s)      3 years and 7 months ago
Posted in : Java Beginners


Hi,

I am developing program on Linux machine. I have to create the .tar file of a directory and subdirectories.

How I can tar directory and subdirectories?

Thanks


Advertisement
View Answers

February 4, 2011 at 7:48 PM


Hi,

It's very easy in Linux or Unix. You can easily create tar archive of directory and subdirectories.

Use the following command:

tar -cvf myArchieve.tar myfolder/

Thanks



Related Tutorials/Questions & Answers:
tar directory and subdirectories
tar directory and subdirectories  Hi, I am developing program on Linux machine. I have to create the .tar file of a directory and subdirectories. How I can tar directory and subdirectories? Thanks   Hi, It's very
JAVA Code for Getting List of Directories and its SubDirectories from FTP server
JAVA Code for Getting List of Directories and its SubDirectories from FTP server  **Hi. I am trying to get list of all directories and sub directories and its files from "FTP" and want to show in Jtree but i am unable to do
Advertisements
Traversing a file and directory under a directory
and subdirectories are traversed lying under a directory. We can find that, how many files and directories are available within a directory. This is very frequently... describes how you can traverse a directory if it contains directory and files
telephone directory
telephone directory  how to make a telephone directory using arrays?   Hi Friend, Please visit the following link: Java Telephone Directory Thanks
Java delete non empty directory
then this method will not delete subdirectories and files of that directory. So...Java delete non empty directory This section demonstrates you how to delete a non empty directory. It is easy to delete a directory if it is empty by simply
Java SDK Directory Structure
stored in 'c' directory that has multiple subdirectories like bin, demo... information bellow. SDK Directory Structure: Subdirectories of the SDK... Java SDK Directory Structure   
Java Create Directory - Java Tutorial
a directory or subdirectories are created. This program also explains the process... a directory "test" and subdirectories "dir1\dir2\dir3"... Java Create Directory - Java Tutorial   
How to move a file from a directory to other directory
How to move a file from a directory to other directory  I tried the above example it will move the folder to other directory but it does not move the image file or other file to a specified directory. Can anyone help me? Thanks
Directory structure of a web application
Directory structure of a web application   Explain the directory structure of a web application.    The directory structure of a web application consists of two parts. A private directory called WEB-INF. A public
File Directory Merging
File Directory Merging  Two directories are given. Both contain a large amount of files. Each of the directory can be more than a GB. We need to form a new directory in which all the files from both the directories
Create Directory in PHP
Create Directory in PHP  Hi, I want to create a small php program like how to create directory in PHP. I need the help of PHP programmer, who could.... Thanks,   Hi, For creating Directory in PHP is not so tough task. I
creating a file in a directory
creating a file in a directory  hi i have tried all the file methods to create a file inside a directory but none of them r working some of them are new File ( ".", "C:/fileInRoot.txt" ) new File ( "myDir", "/otherDir" ) File
Moving file or directory from one directory to another
Moving file or directory from one directory to another... directory is moved from one directory to another directory. This program illustrates you the method or procedure for moving a file or directory contents
Copy Directory or File in Java
the specified source directory (subdirectories and files) to specified destination... Copy Directory in Java      ... the features of the copying the directory and it's contents. This example shows
Books,Books Directory
Books       Books directory, books and ebooks. E Books Electronic books
Open Source Directory
Open Source Directory Open Source Java Directory The Open Source Java Directory is maintained by Steve Mallett, creator of OSDir.com. We welcome and encourage readers to add new product titles to the directory. All
How to make directory in java
Description: This example demonstrate how to create a directory at specified path. Code: import java.io.File; public ... is that it will make a dir at root directory of C drive
MySQL Directory Structure
MySQL Directory Structure       MySQL provide the biological sequence database suitable for large scale sequence search the approaches as well as mysql table. These table dumps
EJB directory structure
EJB directory structure       The tutorial is going to explain the standard directory structure of an EJB... the servlet and JSP pages. Figure: EJB Directory Structure in NetBeans Above
Check if the directory is empty or not
Check if the directory is empty or not In this section, you will learn how to check if the directory is empty or not. Java IO package works with both files and directories. Here we are going to check whether directory is empty
PHP Get Base Directory
PHP Get Base Directory  To know the base directory we may use $_SERVER['DOCUMENT_ROOT']; Code: <?php //to know your base directory print ($_SERVER['DOCUMENT_ROOT']); ?>   Output: C:/wamp/www
Java file new directory
Java file new directory In this section, you will learn how to create a new directory. Description of code: This is a common task. The java.io.package... an object of File class and specify a directory which you want to create. Then we
Adding .txt files in a given directory
files from a given directory and extract tag value from body tag and add each tag value as one .txt file in a given directory? I have extracted tag values but plz help me how can I save each body tag as one .txt file and add in a directory
how to browse folder and directory in jsp
how to browse folder and directory in jsp  how to browse folder and directory in my jsp page.i have done my coding part for browsing directory... based on last modified date for eg:if the directory contains 10 folders i need
Search Directory on Ftp Server
This tutorial describes how to search a specific directory on the server by using java
FTP Server : Remove Directory
In this section you will learn how to delete directory on FTP server using java
FTP Server : Create Directory
In this section you will learn how to create directory on FTP server using java
Java - Deleting the file or Directory
or directory is deleted after checking the existence of the. This topic... of file and directory pathnames.  Explanation This program takes... the specified directory or file. deletefile(String file) The function deletefile
The JDK Directory Structure
Directory structure of JDK Welcome to Java tutorial series. In this lesson, you will learn about the directory structure of Java Development Kit, JDK. Since JRE is also packaged with JDK, we will also discuss about its directory
Java Create Directory Example
Java Create Directory Example To create a directory in java call the mkdir..., to many directories in directory you need to call the mkdirs() mehtod. An example of creating a directory in java is given below SampleInterfaceImp.java import
Checking if a file or directory exist
Checking if a file or directory exist In this section you will learn how to check whether a file or a directory exist or not. The " java.io "... will return "true" if file or directory exist otherwise it returns "
Create a directory in php
Creating a directory in php In  this example, you will learn to create a form in HTML and call php action function of creating directory in HTML form... in the form to create a directory. In PHP, you can create a directory using mkdir
Java Directory - Directory and File Listing Example in Java
Java Directory - Directory and File Listing Example in Java... directory. This topic is related to the I/O (input/output... and directory pathnames. This class is an abstract, system-independent view
Java count files in a directory
Java count files in a directory In this section, you will learn how to count only files in a directory. You have learnt various file operations. Here we are going to find out the number of files from a directory. You can see
ls: cannot access >: No such file or directory
: cannot access >: No such file or directory error is displayed .No f.txt
Web Application Directory Structure:
Web Application Directory Structure:       To develop an application using  servlet or jsp make the directory structure like... to this directory structure:  Roseindia/    WEB
PHP list contents of directory
Contents of a directory or a folder can be displayed one by one. readdir() function returns the directory as well as file name. readdir() takes input... Constents of Directory <?php $file=opendir("c:\apache-ant-1.7.1-bin
Delete file or Directory
Delete file or Directory      ... or a directory by using a java program. We pass the file name or the directory name to which... is not write protected. this example also deletes an existing directory
Find Current Temp Directory
directory. We are using getProperty(String key) method to find the current temp directory. The getProperty(String key) is defined into System class...; as key to get the current temp directory into getProperty() method
Checking Directory existence on Ftp Server
In this section, you will learn how to check existence of a directory on the server by using java
EJB directory structure
EJB directory structure       The tutorial is going to explain the standard directory structure of an EJB... the servlet and JSP pages. Figure: EJB Directory Structure in NetBeans Above
Determining if a File or Directory exist
Determining if a File or Directory Exist   ... to determine whether a file or directory exists or not. If it exists it returns... have used following methods: exists(): It checks whether the file or directory
Find User Home Directory
Find User Home Directory        In this example we are find user home directory. We..." as key to get the user define home directory
Rename the File or Directory in Java
Rename the File or Directory in Java   ... a file or directory is renamed. This program illustrates you the procedure... or directory. If you mention the directory (path) with the new file or directory name
Login Authentication using existing Active Directory.
Login Authentication using existing Active Directory.  I need jsp... Active Directory. Here no need to create active directory.The JSP code should... or Active directory URL
how to copy the directory in to ftp server using java
how to copy the directory in to ftp server using java  how to copy the directory in to ftp server using java ?   Hello venaktehs As much as I know,You can do this as follows: First,Create a directory in the current
Create text file at client's directory from server.
Create text file at client's directory from server.  Need java code to create text file at client's directory from server..... Please Help
Java file get parent directory
Java file get parent directory In this section, you will learn how to get the parent directory of the file. Description of code: The package java.io.... which of String type. This method returns the parent directory of specified file
File copy from one directory to another in java
File copy from one directory to another in java  I am trying to find very good code example for copying a file from one directory to another directory in Java. I have to write a program in my application for copying one file
Getting the Current Working Directory in Java
C:\nisha>javac GetCurrentDir.java C:\nisha>java GetCurrentDir Current Working Directory : C:\nisha C:\nisha> Download this example
Advertisements
 

 

 

DMCA.com