mirror of
https://github.com/RGBCube/random-scripts
synced 2025-05-14 02:54:58 +00:00
fix incredibly slow linearization
This commit is contained in:
parent
3d2b854882
commit
4c1dfb6f6e
1 changed files with 3 additions and 2 deletions
|
@ -10,7 +10,7 @@ if (ls $root | is-not-empty) {
|
|||
|
||||
let source = input "enter directory to linearize: "
|
||||
|
||||
ls ...(glob $"($source)/**/*")
|
||||
ls ...(glob --no-dir $"($source)/**/*")
|
||||
| where type == file
|
||||
| group-by size | values
|
||||
| each {|group|
|
||||
|
@ -25,7 +25,8 @@ ls ...(glob $"($source)/**/*")
|
|||
$by_identity
|
||||
| filter { ($in | length) > 1 }
|
||||
| each {|entries|
|
||||
print $"found identical files: \n- (ansi red)($entries | get name | str join $'(ansi reset)\n- (ansi red)')(ansi reset)"
|
||||
let separator = $"(ansi reset)\n- (ansi red)"
|
||||
print $"found identical files: \n- (ansi red)($entries | get name | str join $separator)(ansi reset)"
|
||||
}
|
||||
|
||||
$by_identity
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue