Ignotum

  • 25 Posts
  • 1.86K Comments
Joined 3 years ago
cake
Cake day: June 12th, 2023

help-circle

  • Ignotumtomemesthe client is waiting
    link
    fedilink
    arrow-up
    32
    ·
    2 days ago

    I’m not sure I would describe rape as just “inappropriate”, but yes I do think rape should be illegal, and people should be protected from ending up in situations where they get raped



  • Ignotumtomemesthe client is waiting
    link
    fedilink
    arrow-up
    135
    arrow-down
    4
    ·
    2 days ago

    If someone is forced to do things with a client they dont want to, then they’re not sex workers, they’re sex slaves

    Decriminalise sex work and put in place regulations to protect workers




  • Everything can be done as a single (but often quite long) command, something like this:

    for filepath in A/*; do filename=$(basename "$filepath"); name="${filename%.*}; match=$(ls B/"$name".* 2>/dev/null); [ -z "$match" ] && rm "$filepath"; done
    

    What it does is

    1. Loops over the files in directory A
    2. Gets the filename (my_file.ext)
    3. Strips the extension
    4. Looks for any files in B with the same name but any extension
    5. If no match, delete the file (from A)
      I haven’t tested it so might be some typos in there, also maybe replace rm with echo and run it first just to see what files it would have deleted, there’s no undo when you use rm

    Also if there are 100k+ files this is likely going to be relatively slow, then i would create two files containing the names of all the files in each directory, sort them, then there is a command to find differences between them very efficiently but i don’t remember which…