Subversion Repositories sysadmin_scripts

Rev

Rev 158 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 158 Rev 162
Line 1... Line 1...
1
#! /usr/bin/env perl
1
#! /usr/bin/env perl
2
 
2
 
-
 
3
# fdupesGreatestSavings
-
 
4
#
-
 
5
# Filter which takes the output of fdupes --size and reports on which duplicated
-
 
6
# files clean up will result in the greatest savings.
-
 
7
# 
-
 
8
# Usage: fdupes --size --recurse / | fdupesGreatestSavings 100
-
 
9
#
-
 
10
# Copyright 2024 Daily Data, Inc.
-
 
11
# 
-
 
12
# Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following 
-
 
13
# conditions are met:
-
 
14
#
-
 
15
#   Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
-
 
16
#   Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer 
-
 
17
#   in the documentation and/or other materials provided with the distribution.
-
 
18
#   Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived
-
 
19
#   from this software without specific prior written permission.
-
 
20
# 
-
 
21
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT
-
 
22
# NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
-
 
23
# THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-
 
24
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-
 
25
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
-
 
26
# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
 
27
 
3
use strict;
28
use strict;
4
use warnings;
29
use warnings;
5
use Data::Dumper;
30
use Data::Dumper;
6
 
31
 
7
# takes a path and returns an array of the path for each subdirectory
32
# takes a path and returns an array of the path for each subdirectory