Commit 4b61381 1 parent 50bd39e commit 4b61381 Copy full SHA for 4b61381
File tree 1 file changed +2
-2
lines changed
1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -858,7 +858,7 @@ that can be easily solved with some other tools.
858
858
Copying unique files
859
859
~~~~~~~~~~~~~~~~~~~~
860
860
861
- Imagine you have a folder from which you want to extract one copy of each file
861
+ Imagine you have a directory from which you want to extract one copy of each file
862
862
by content. This does not only mean unique files, but also original files - but
863
863
not their duplicates. This sounds like a job for the ``uniques `` formatter
864
864
(which outputs all unique paths, one by line) and ``jq ``. ``jq `` is a great
@@ -872,7 +872,7 @@ little `tool`_ which makes it really easy to extract data from a ``json`` file:
872
872
# - unique_files: Files that have a unique checksum in the directory.
873
873
# - original_files: Files that have the "is_original" field set to true in the json output.
874
874
# The '.[1:-1]' part is for filtering the header and footer part of the json response.
875
- $ rmlint t -o json -o uniques:unique_files | jq -r ' .[1:-1][] | select(.is_original) | .path' | sort > original_files
875
+ $ rmlint dir/ -o json -o uniques:unique_files | jq -r ' .[1:-1][] | select(.is_original) | .path' | sort > original_files
876
876
# Now we only need to combine both files:
877
877
$ cat unique_files original_files
878
878
You can’t perform that action at this time.
0 commit comments