Linux tar exclude parameter usage

Source: Internet
Author: User
Tags gz file

 

# The BBB, CCC, and BNR subdirectories exist in the current tree directory. Now, you need to filter out the dump file of gz, that is, you do not need to package [oracle @ linux1 ~]. $ Tree AAAAAA | -- BBB | '-- SYTST_temp.dbf | -- BNR | -- dump | -- emp.dmp.gz | -- tb.dmp.gz |' -- xx.dmp.gz | '-- full | -- CCC | '-- tempSYTST. dbf | -- SYTST. sh' -- initSYTST. ora5 directories, 7 files

# Method 1: Filter Using the exclude parameter and use the wildcard [oracle @ linux1 ~] $ Tar-czvf A1.tar.gz -- exclude '*. gz '. /AAA. /AAA /. /AAA/CCC /. /AAA/CCC/tempSYTST. dbf. /AAA/BBB /. /AAA/BBB/SYTST_temp.dbf. /AAA/SYTST. sh. /AAA/initSYTST. ora. /AAA/BNR /. /AAA/BNR/full /. /AAA/BNR/dump/# view the content in the package. There is no gz file [oracle @ linux1 ~] $ Tar-tvf A1.tar.gz drwxr-xr-x oracle/oinstall 0 14:10:43. /AAA/drwxr-xr-x oracle/oinstall 0 14:12:18. /AAA/CCC/-rwxr-xr-x oracle/oinstall 209723392 14:12:19. /AAA/CCC/tempSYTST. dbfdrwxr-xr-x oracle/oinstall 0 14:11:56. /AAA/BBB/-rwxr-xr-x oracle/oinstall 104865792 14:11:56. /AAA/BBB/SYTST_temp.dbf-rwxr-xr-x oracle/oinstall 1281 0: 43. /AAA/SYTST. sh-rwxr-xr-x oracle/oinstall 2949 14:10:31. /AAA/initSYTST. oradrwxr-xr-x oracle/oinstall 0 14:11:12. /AAA/BNR/drwxr-xr-x oracle/oinstall 0 14:11:12. /AAA/BNR/full/drwxr-xr-x oracle/oinstall 0 14:11:04. /AAA/BNR/dump/# method 2. Use multiple exclude parameters to filter [oracle @ linux1 ~] $ Tar-czvf A2.tar.gz -- exclude = 'tempsytst. dbf' -- exclude = SYTST_temp.dbf. /AAA. /AAA /. /AAA/CCC /. /AAA/BBB /. /AAA/SYTST. sh. /AAA/initSYTST. ora. /AAA/BNR /. /AAA/BNR/full /. /AAA/BNR/dump /. /AAA/BNR/dump/xx.dmp.gz. /AAA/BNR/dump/tb.dmp.gz. /AAA/BNR/dump/emp.dmp.gz # method 3: add the file to be filtered to the file by using the exclude parameter, and then read from the file [oracle @ linux1 ~] $ Echo "*. dbf"> exclude.txt [oracle @ linux1 ~] $ Echo "*. gz"> exclude.txt [oracle @ linux1 ~] $ More exclude.txt *. dbf *. gz [oracle @ linux1 ~] $ Tar-czvf A3.tar.gz --exclude-from=exclude.txt. /AAA. /AAA /. /AAA/CCC /. /AAA/BBB /. /AAA/SYTST. sh. /AAA/initSYTST. ora. /AAA/BNR /. /AAA/BNR/full /. /AAA/BNR/dump/# Method 4. With the exclude parameter, you can directly filter all files in the specified folder by adding wildcards to the directory [oracle @ linux1 ~] $ Tar-czvf A4.tar.gz -- exclude =. /AAA/BNR/dump /*. /AAA. /AAA /. /AAA/CCC /. /AAA/CCC/tempSYTST. dbf. /AAA/BBB /. /AAA/BBB/SYTST_temp.dbf. /AAA/SYTST. sh. /AAA/initSYTST. ora. /AAA/BNR /. /AAA/BNR/full /. /AAA/BNR/dump/# Method 5. Use the exclude parameter to directly filter [oracle @ linux1 ~] Directories $ Tar-czvf A4.tar.gz -- exclude =. /AAA/BNR. /AAA. /AAA /. /AAA/CCC /. /AAA/CCC/tempSYTST. dbf. /AAA/BBB /. /AAA/BBB/SYTST_temp.dbf. /AAA/SYTST. sh. /AAA/initSYTST. ora

# Use help to obtain help information [oracle @ linux1 ~] $ Tar -- helpUsage: tar [OPTION...] [FILE]... GNU 'tar 'saves program files together into a single tape or disk archive, and canrestore individual files from the archive. examples: tar-cf archive.tar foo bar # Create archive.tar from files foo and bar. tar-tvf archive.tar # List all files in archive.tar verbosely. tar-xf archive.tar # Extract all files from archive.tar ........... omitted ........... # use man or Info for help information [oracle @ linux1 ~] $ Man tar

 

Use crs_profile to manage RAC resource configuration files
RAC database startup and Shutdown
Oracle RAC services
Services in Oracle Database 10g
Migrate datbase from single instance to Oracle RAC
Connect Oracle RAC to a specified instance
Oracle RAC load balancing test (combined with server and client)
Oracle RAC server connection Load Balance)
Load Balance)
Non-Default port listening configuration in oracle rac (listener. ora tnsnames. ora)
Oracle rac listener Configuration (listener. ora tnsnames. ora)
Configure RAC load balancing and Failover
CRS-1006, CRS-0215 fault case
Installing Oracle 10g RAC Based on Linux (RHEL 5.5)
Use runcluvfy to verify the Oracle RAC installation environment

Configure dynamic service registration for non-default ports
Configure sqlnet. ora to restrict IP Access to Oracle
Configure and manage Oracle listener logs
Set the Oracle LISTENER password (LISTENER)
Configure the ORACLE client to connect to the database

Oracle cold backup
Oracle Hot Backup
Concept of Oracle backup recovery
Oracle instance recovery
Oracle recovery based on user management
SYSTEM tablespace management and Backup Recovery
SYSAUX tablespace management and recovery
Oracle backup control file recovery (unsing backup controlfile)

RMAN overview and architecture
RMAN configuration, Monitoring and Management
Detailed description of RMAN backup
RMAN restoration and recovery
Create and use RMAN catalog
Create RMAN storage script based on catalog
Catalog-based RMAN backup and recovery
RMAN backup path confusion
Use RMAN for recovery from different machine backups (WIN platform)
Use RMAN to migrate a file system database to ASM
Linux RMAN backup shell script
Use RMAN to migrate the database to a different machine

Oracle tablespace and data files
Oracle Password File
Oracle parameter file
Oracle ONLINE redo LOG FILE)
Oracle Control File)
Oracle archiving logs
Oracle ROLLBACK and UNDO)
Oracle database instance startup and Shutdown Process
Automated Management of Oracle 10g SGA
Oracle instances and Oracle databases (Oracle Architecture)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.