Re: Script for finding and "moving" older duplicate packages from /var/cache/pacman/pkg

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On Monday 24 August 2009 11:51:45 pm David C. Rankin wrote:
> 
<snip> 
> 	The script for finding and moving older duplicate packages is named fduppkg and is fairly self-explanitory. Running without arguments gives the options:
> 

	BASH never fails to amaze me, 3116 element array to handle the packages, and BASH never batted an eye. It just kept on trucking....

[00:41 archangel:/home/david/scripts/file] # ./fdup-archpkg -v

<big snip>

${SARRAY[3114]} zenity-2.26.0-1-x86_64.pkg.tar.gz
Search filename: zenity
Search Architecture: x86_64
Duplicate filename: zenity
Duplicate Architecture: x86_64
Keeping:  /var/cache/pacman/pkg/zenity-2.26.0-2-x86_64.pkg.tar.gz
Duplicate found: 1
Search filename: zenity
Search Architecture: x86_64
Duplicate filename: zenity
Duplicate Architecture: x86_64
`/var/cache/pacman/pkg/zenity-2.26.0-1-x86_64.pkg.tar.gz' -> `/home/backup/pkg-old/zenity-2.26.0-1-x86_64.pkg.tar.gz'
removed `/var/cache/pacman/pkg/zenity-2.26.0-1-x86_64.pkg.tar.gz'
Duplicate found: 2

${SARRAY[3116]} zip-3.0-1-x86_64.pkg.tar.gz
Search filename: zip
Search Architecture: x86_64
Duplicate filename: zip
Duplicate Architecture: x86_64
Keeping:  /var/cache/pacman/pkg/zip-3.0-1-x86_64.pkg.tar.gz
Duplicate found: 1

Done!

[00:43 archangel:/home/david/scripts/file] # du -hcs /var/cache/pacman/pkg/
3.0G    /var/cache/pacman/pkg/
3.0G    total
[00:48 archangel:/home/david/scripts/file] # du -hcs /home/backup/pkg-old/
5.2G    /home/backup/pkg-old/
5.2G    total

	There's an extra 5.2G back ;-)

-- 
David C. Rankin, J.D.,P.E.
Rankin Law Firm, PLLC
510 Ochiltree Street
Nacogdoches, Texas 75961
Telephone: (936) 715-9333
Facsimile: (936) 715-9339
www.rankinlawfirm.com


[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux