![]() unix shell script for loop exampleĪwk command in Unix : Awk command in Unix or Linux is a powerful command for processing text. Unix shell script for loop example : what is loop statement in Unix shell scripting,what are different type of statement with examples. Complete description is given for each of the command Sed command in unix examples : sed command is a Stream Editor – works as a filter processing input line by line And here are 32 Useful sed command examples in Linux/Unixīasic unix command :Unix Script Tutorial for basic unix command which are used many times. ![]() Same are applicable for Linux also.How to kill the process Linux command for Oracle DBA : This page has useful Unix command for Oracle DBA to help you in your day-to-day activities. This article will help you understand how you can handle the common file formats TAR, GZIP, BZIP and ZIP on Linux operating systems (including CentOS. Unzip tar.gz file in Linux : Check out this post on how to create ,list and unzip Tar.gz file in Linux, how to use bzip2 compression, how to compress and extract using other options So basically you can create jdk directory in any folder by this approach while by first approach,it will always created in /home/oracle/ It create a tar file of jdk and its all inside directory in the current directly where the command is executed Now if you take the tar backup like this cd /home/oracle/ Then It will create file in the same relative path It create a tar file of/home/oracle/jdk and its all inside directory in the current directly where the command is executed Once you have pulled the file the tar operation will work as expected, most modern versions of linux/bsd have a 'smart' tar, which doesn't need the. Wildcard file expansion (the ) does not work for the get command. (1) The relative path is important while extracting file from tarĮxample tar -cvf user_dir.tar /home/oracle/jdk Firstly, if you want to use wildcards for the file name that you're getting from the server you need to use mget instead of get. If you can install it, you can use udpcast to stream one thing to 9 servers. If you want to extract multiple directories, then run the following command. The command structure is similar to the section above. Tar rvf host_dir.tar new.txttar rvf host_dir.tar new/įew important things to note down for tar command line for SERVER in server1 server2 server3 do ssh usernameSERVER tar -C /path/to/dest -xf - < /path/to/file.tar & done wait Running 9 simultaneous ssh/scp/whatever sessions may not be a good idea, you might want to limit that. Assuming the tar archive at your hand contains a directory or more, you can manually tell tar which directory to extract. Extract a single directory from tar tar -xvf user_dir.tar /home/oracle/network/admin/ħ.Extract group of files from tar using regular expression tar -xvf oracle_hom.tar -wildcards '*.ora'Ĩ. Adding a file or directory to an existing archive using option -r ![]() To extract files from tar file: $tar -xvf user_dir.tarĤ.To tar files as per include options: $tar -cvf user_dir.tar -I list_of_filesĥ. Extract a single file from tar tar -xvf user_dir.tar /home/oracle/network/admin/tnsnames.oraĦ. Lists the contents of the tar file created. Using the tar Command to Create an Archive of Your Home Directory.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |