• compressing and password protect file group individually?

    From JR Dolobson@[email protected] to alt.os.linux.ubuntu on Fri Mar 6 16:40:25 2026
    From Newsgroup: alt.os.linux.ubuntu

    In Ubuntu, right now I'm selecting each individual file (left clicking),
    right clicking and choosing compress, keeping same file name, and then entering password, then create but this is going to take a long time for
    well over a hundred files! I don't want to create a new archive name
    for the group as this will mean that all would have to be unzipped
    later. I just want to keep original file names. thanks
    --- Synchronet 3.21d-Linux NewsLink 1.2
  • From George@[email protected] to alt.os.linux.ubuntu on Fri Mar 6 22:55:32 2026
    From Newsgroup: alt.os.linux.ubuntu

    On 06/03/2026 21:40, JR Dolobson wrote:
    In Ubuntu, right now I'm selecting each individual file (left
    clicking), right clicking and choosing compress, keeping same file
    name, and then entering password, then create but this is going to
    take a long time for well over a hundred files!  I don't want to
    create a new archive name for the group as this will mean that all
    would have to be unzipped later.  I just want to keep original file names.  thanks


    Try this:

    #!/usr/bin/env bash
    for f in *; do [[ -f "$f" && ! "$f" =~ \.gz$ ]] && gzip -9 "$f"; done

    ,gz doesn't support passwords!



    --- Synchronet 3.21d-Linux NewsLink 1.2