:: Re: [DNG] rm not freeing space (SOL…
Etusivu
Poista viesti
Vastaa
Lähettäjä: Rick Moen
Päiväys:  
Vastaanottaja: dng
Aihe: Re: [DNG] rm not freeing space (SOLVED)
Quoting Marc Shapiro via Dng (dng@???):

> On 3/19/21 8:31 PM, tempforever via Dng wrote:
> >
> >To find files last modified in January:
> >(adjust the dates as needed; on Mar. 19 this should locate files dated
> >Jan 1 - 31 but it could be off a day or so)
> >
> >cd /media/archives
> >find -type f -mtime -78 -mtime +46 -ls
>
> Thank you!
>
> That found the files.  They were in a hidden directory
> '/media/archives/.Trash-0'. 


Aha! For your future convenience, here is a Perl script I get a lot of
use from, when looking for the (individually) largest files within $PWD
and its subtrees:


:r /usr/local/bin/largest20

#!/usr/bin/perl -w
# You can alternatively just do:
# find . -xdev -type f -print0 | xargs -r0 ls -l | sort -rn -k +5 | head -20
# Sometimes also handy: du -cks * | sort -rn
use File::Find;

@ARGV = $ENV{ PWD } unless @ARGV;
find ( sub { $size{ $File::Find::name } = -s if -f; }, @ARGV );
@sorted = sort { $size{ $b } <=> $size{ $a } } keys %size;
splice @sorted, 20 if @sorted > 20;
printf "%10d %s\n", $size{$_}, $_ for @sorted