Skip to content

Commit c814939

Browse files
ildyriaCopilot
andauthored
Apply suggestions from code review
Co-authored-by: Copilot <[email protected]>
1 parent 427f85b commit c814939

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/content/post/2025-07-29-finding-duplicates.mdx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ In this case the hash of the file is `d48a6235db35f89b0ab27c9f460824d3ad7140be`.
4141

4242
#### Step 2: Locate the database container.
4343

44-
We need to figure out the container ID of the database. This is down by running a `docker ps` command to reveal the active containers.
44+
We need to figure out the container ID of the database. This is done by running a `docker ps` command to reveal the active containers.
4545

4646
```sh
4747
$ docker ps --format "table {{.ID}}\t{{.Image}}\t{{.Names}}"
@@ -64,7 +64,7 @@ For this we use the `docker exec -it <container_id> <command>` command.
6464

6565
This gives us:
6666
```sh
67-
$ docker exec -it 520ac mariadb -u <db_username> -p"<db_password>" <db_name>
67+
$ docker exec -it 22e2 mariadb -u <db_username> -p"<db_password>" <db_name>
6868
MariaDB [lychee]>
6969
```
7070
Obviously, replace `<db_username>` by the username used in your `.env`, and similarly `<db_password>` by the password, and `<db_name>` for the database name.
@@ -73,8 +73,8 @@ Obviously, replace `<db_username>` by the username used in your `.env`, and simi
7373

7474
#### Step 4: Locate the duplicate
7575

76-
Now that we are in, let's do our first query. We could either do and equality test or as we are lazy and do not feel like
77-
pasting 40 characters, do a `LIKE`. Do note that I am endinging the _Like-string_ with `%` to specify that this a prefix.
76+
Now that we are in, let's do our first query. We could either do an equality test or as we are lazy and do not feel like
77+
pasting 40 characters, do a `LIKE`. Do note that I am ending the _Like-string_ with `%` to specify that this is a prefix.
7878

7979
```sql
8080
SELECT id, title, checksum, original_checksum FROM photos WHERE checksum LIKE 'd48%' OR original_checksum LIKE 'd48%';
@@ -102,7 +102,7 @@ SELECT id, title, checksum, original_checksum FROM photos WHERE checksum LIKE 'd
102102
```
103103

104104
We now have all the pictures where the `checksum` or `original_checksum` starts with `d48`, 16 matches.
105-
Of those only one is intersting for us, the one that matches exactly the sha1sum we computed before:
105+
Of those only one is interesting for us, the one that matches exactly the sha1sum we computed before:
106106
`d48a6235db35f89b0ab27c9f460824d3ad7140be`. That one is `_r5_1287` with id `9aujfSLHxurI3mYQhizwvH3A`.
107107

108108
Having the id of the image is not enough to locate it in the UI. We need to do a second query to figure out to which album

0 commit comments

Comments
 (0)