Some may keep distfiles in /usr/ports/distfiles, say if a port has a minor version bump and one does not wish to re-dowload. However, there may be
Thisport-1.gz
Thisport-2.gz etc which were inadvertantly left behind, say by an interrupted
portmaster run or equivalent.
If one is fortunate, only a few extra files to delete will be shown by the last command in the sequence, and one's shell (if configured to) can complete the filenames as one deletes the duplicates.
[I discovered the gnuls part previously, but only very recently the freebsd-questions list mentioned the tr command.]
.....
Not quite yet able to use the suggestions below as I've many .dat, subdirectories (etc) in /usr/ports/distfiles from the days I saved every other file there, comments, coding tests etc. ( .. and busy at the moment with other configuration tasks...)
Thisport-1.gz
Thisport-2.gz etc which were inadvertantly left behind, say by an interrupted
portmaster run or equivalent.
Code:
# only've tried it with [port]gnuls[/port]
cd [FILE]/usr/ports/distfiles[/FILE]
gnuls -R "*.Z" "*.zip" "*.bz2" "*.gz" "*.tgz" -1 | sort | tee -a [FILE]/tmp/fil.1[/FILE]
tr -d "[:digit:]" < [FILE]fil.1[/FILE] > [FILE]fil.2[/FILE]
cat [FILE]fil.2[/FILE] | uniq -d
[I discovered the gnuls part previously, but only very recently the freebsd-questions list mentioned the tr command.]
.....
Not quite yet able to use the suggestions below as I've many .dat, subdirectories (etc) in /usr/ports/distfiles from the days I saved every other file there, comments, coding tests etc. ( .. and busy at the moment with other configuration tasks...)