this post was submitted on 04 Sep 2025
27 points (96.6% liked)

Linux

57991 readers
630 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 6 years ago
MODERATORS
 

locate is a command I've used in the past, but now, fresh installed with sudo apt get locate it doesn return anything.

locate --version returns locate (GNU findutils) 4.10.0, from 2024

or, have I forgotten something?

you are viewing a single comment's thread
view the rest of the comments
[–] interdimensionalmeme@lemmy.ml 3 points 3 days ago (1 children)

using find to sort all pictures in /pics/ by inverted (i.e., most recently accessed first) access time, and filtering only those with an exposure time between 1/20 and 1/100 seconds

find /pics/ -type f \( -iname '*.jpg' -o -iname '*.jpeg' -o -iname '*.png' \) \
  -exec exiftool -ExposureTime -T {} \; -exec bash -c '
    file="$1"
    exposure="$2"

    # Convert exposure to decimal
    if [[ "$exposure" =~ ^([0-9]+)/([0-9]+)$ ]]; then
        num="${BASH_REMATCH[1]}"
        denom="${BASH_REMATCH[2]}"
        exposure_val=$(echo "$num / $denom" | bc -l)
    else
        exposure_val="$exposure"
    fi

    # Filter by exposure between 1/100 and 1/20 seconds
    if (( $(echo "$exposure_val >= 0.01" | bc -l) )) && (( $(echo "$exposure_val <= 0.05" | bc -l) )); then
        atime=$(stat -c %X "$file")  # Access time (epoch)
        echo "$atime $file"
    fi
  ' bash {} $(exiftool -s3 -ExposureTime {}) | sort -nr

In voidtools everything it would be

pic: path:"C:\pics" sort:da-descending ExposureTime:1/20..1/100

But actually doesn't work because "ExposureTime" is only available as an sorting order not a filter but you get the gist ;)

[–] pitiable_sandwich540@feddit.org 2 points 3 days ago (1 children)

Ah yeah okay, I see, that would be quite tedious to implement in bash. Everything looks pretty neat. :D

Buuut I just looked at KDE's search framework filter options (used by dolphin if you press + f ) and it seems it is indeed possible to search/filter by exposure time with dolphin or via directly in the cli.

[–] interdimensionalmeme@lemmy.ml 2 points 3 days ago

I have to try this !