Sponsored Content
Top Forums UNIX for Advanced & Expert Users AIX find duplicate backup files Post 303043306 by cokedude on Thursday 23rd of January 2020 06:31:01 PM
Old 01-23-2020
AIX find and delete old backup files

I would like find and delete old backup files in aix. How would I go about doing this? For example:

Code:
server1_1-20-2020
server1_1-21-2020
server1_1-22-2020
server1_1-23-2020
server2_1-20-2020
server2_1-21-2020
server2_1-22-2020
server2_1-23-2020

How would I go about finding and deleting old backup files? I would like to be left with only this after deleting the old backups.

Code:
server1_1-23-2020
server12_1-23-2020


Last edited by cokedude; 01-24-2020 at 02:47 PM..
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

how to find duplicate files with find ?

hello all I like to make search on files , and the result need to be the files that are duplicated? (8 Replies)
Discussion started by: umen
8 Replies

2. Shell Programming and Scripting

Find Duplicate files, not by name

I have a directory with images: -rw-r--r-- 1 root root 26216 Mar 19 21:00 020109.210001.jpg -rw-r--r-- 1 root root 21760 Mar 19 21:15 020109.211502.jpg -rw-r--r-- 1 root root 23144 Mar 19 21:30 020109.213002.jpg -rw-r--r-- 1 root root 31350 Mar 20 00:45 020109.004501.jpg -rw-r--r-- 1 root... (2 Replies)
Discussion started by: Ikon
2 Replies

3. UNIX for Dummies Questions & Answers

Not Listing Duplicate Backup Files

I've searched about a bit and more than likely, I'm not entering the correct search phrase, but my question is as follows: When a user does an 'ls' (and whatever various flags needed) and in the results, we see duplicate or backup files from editing. IE: file1.txt file1.txt~ Is there a... (3 Replies)
Discussion started by: Brusimm
3 Replies

4. Shell Programming and Scripting

Find duplicate files

What utility do you recommend for simply finding all duplicate files among all files? (4 Replies)
Discussion started by: kiasas
4 Replies

5. Shell Programming and Scripting

Find duplicate files by file size

Hi! I want to find duplicate files (criteria: file size) in my download folder. I try it like this: find /Users/frodo/Downloads \! -type d -exec du {} \; | sort > /Users/frodo/Desktop/duplicates_1.txt; cut -f 1 /Users/frodo/Desktop/duplicates_1.txt | uniq -d | grep -hif -... (9 Replies)
Discussion started by: Dirk Einecke
9 Replies

6. Shell Programming and Scripting

find duplicate string in many different files

I have more than 100 files like this: SVEAVLTGPYGYT 2 SVEGNFEETQY 10 SVELGQGYEQY 28 SVERTGTGYT 6 SVGLADYNEQF 21 SVGQGYEQY 32 SVKTVLGYEQF 2 SVNNEQF 12 SVRDGLTNSPLH 3 SVRRDREGLEQF 11 SVRTSGSYEQY 17 SVSVSGSPLQETQY 78 SVVHSTSPEAF 59 SVVPGNGYT 75 (4 Replies)
Discussion started by: xshang
4 Replies

7. Shell Programming and Scripting

Find duplicate files but with different extensions

Hi ! I wonder if anyone can help on this : I have a directory: /xyz that has the following files: chsLog.107.20130603.gz chsLog.115.20130603 chsLog.111.20130603.gz chsLog.107.20130603 chsLog.115.20130603.gz As you ca see there are two files that are the same but only with a minor... (10 Replies)
Discussion started by: fretagi
10 Replies

8. Shell Programming and Scripting

Find duplicate rows between files

Hi champs, I have one of the requirement, where I need to compare two files line by line and ignore duplicates. Note, I hav files in sorted order. I have tried using the comm command, but its not working for my scenario. Input file1 srv1..development..employee..empname,empid,empdesg... (1 Reply)
Discussion started by: Selva_2507
1 Replies

9. Shell Programming and Scripting

Find help in shell - that clears away duplicate files

I am so frustrated!!! I want a nice command that clears away duplicate files: find . -type f -regex '.*{1,3}\..*' | xargs -I## rm -v '##' should work in my opinion. But it finds nothing even though I have files that have the file name: Scooby-Doo-1.txt Himalaya-2.jpg Camping... (8 Replies)
Discussion started by: Mr.Glaurung
8 Replies

10. Shell Programming and Scripting

To Find Duplicate files using latest in Linux

I have tried the following code and with that i couldnt achieve what i want. #!/usr/bin/bash find ./ -type f \( -iname "*.xml" \) | sort -n > fileList sed -i '/\.\/fileList/d' fileList NAMEOFTHISFILE=$(echo $0|sed -e 's/\/()$*.^|/\\&/g') sed -i "/$NAMEOFTHISFILE/d"... (2 Replies)
Discussion started by: gold2k8
2 Replies
ippool(4)                                                          File Formats                                                          ippool(4)

NAME
ippool, ippool.conf - IP pool file format SYNOPSIS
ippool.conf DESCRIPTION
The format for files accepted by ippool(1M) is described by the following grammar: line ::= table | groupmap . table ::= "table" role tabletype . groupmap ::= "group-map" inout role number ipfgroup tabletype ::= ipftree | ipfhash . role ::= "role" "=" "ipf" . inout ::= "in" | "out" . ipftree ::= "type" "=" "tree" number "{" addrlist "}" . ipfhash ::= "type" "=" "hash" number hashopts "{" hashlist "}" . ipfgroup ::= setgroup hashopts "{" grouplist "}" | hashopts "{" setgrouplist "}" . setgroup ::= "group" "=" groupname . hashopts ::= size [ seed ] | seed . size ::= "size" "=" number . seed ::= "seed" "=" number . addrlist ::= range [ "," addrlist ] . grouplist ::= groupentry [ ";" grouplist ] | groupentry ";" | addrmask ";" | addrmask ";" [ grouplist ] . setgrouplist ::= groupentry ";" [ setgrouplist ] . groupentry ::= addrmask "," setgroup . range ::= addrmask | "!" addrmask . hashlist ::= hashentry ";" [ hashlist ] . hashentry ::= addrmask . addrmask ::= ipaddr | ipaddr "/" mask . mask ::= number | ipaddr . groupname ::= number | name . number ::= digit { digit } . ipaddr = host-num "." host-num "." host-num "." host-num . host-num = digit [ digit [ digit ] ] . digit ::= "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" . name ::= letter { letter | digit } . The IP pool configuration file is used for defining a single object that contains a reference to multiple IP address/netmask pairs. A pool can consist of a mixture of netmask sizes, from 0 to 32. In the current release, only IPv4 addressing is supported in IP pools. The IP pool configuration file provides for defining two different mechanisms for improving speed in matching IP addresses with rules. The first, table, defines a lookup table to provide a single reference in a filter rule to multiple targets. The second mechanism, group-map, provides a mechanism to target multiple groups from a single filter line. The group-map command can be used only with filter rules that use the call command to invoke either fr_srcgrpmap or fr_dstgrpmap, to use the source or destination address, respectively, for determining which filter group to jump to next for continuation of filter packet pro- cessing. Pool Types Two storage formats are provided: hash tables and tree structure. The hash table is intended for use with objects that all contain the same netmask or a few, different sized-netmasks of non-overlapping address space. The tree is designed for supporting exceptions to a covering mask, in addition to normal searching as you would do with a table. It is not possible to use the tree data storage type with group-map configuration entries. Pool Roles When a pool is defined in the configuration file, it must have an associated role. At present the only supported role is ipf. Future devel- opment might see further expansion of the use of roles by other sections of IPFilter code. EXAMPLES
The following examples show how the pool configuration file is used with the ipf configuration file to enhance the succinctness of the lat- ter file's entries. Example 1: Referencing Specific Pool The following example shows how a filter rule makes reference to a specific pool for matching of the source address. pass in from pool/100 to any The following pool configuration matches IP addresses 1.1.1.1 and any in 2.2.0.0/16, except for those in 2.2.2.0/24. table role = ipf type = tree number = 100 { 1.1.1.1/32, 2.2.0.0/16, !2.2.2.0/24 }; Example 2: ipf Configuration Entry The following ipf.conf excerpt uses the fr_srcgrpmap/fr_dstgrpmap lookups to use the group-map facility to look up the next group to use for filter processing, providing the call filter rule is matched. call now fr_srcgrpmap/1010 in all call now fr_dstgrpmap/2010 out all pass in all group 1020 block in all group 1030 pass out all group 2020 block out all group 2040 An ippool configuration to work with the preceding ipf.conf segment might look like the following: group-map in role = ipf number = 1010 { 1.1.1.1/32, group = 1020; 3.3.0.0/16, group = 1030; }; group-map out role = ipf number = 2010 group = 2020 { 2.2.2.2/32; 4.4.0.0/16; 5.0.0.0/8, group = 2040; }; FILES
o /dev/ippool o /etc/ipf/ippool.conf o /etc/hosts ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWipfu | +-----------------------------+-----------------------------+ |Interface Stability |Evolving | +-----------------------------+-----------------------------+ SEE ALSO
ipf(1M), ipnat(1M), ippool(1M), ipf(4), attributes(5), hosts(4) SunOS 5.10 30 Apr 2004 ippool(4)
All times are GMT -4. The time now is 03:31 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy