PodcastsNyhederHacker Public Radio

Hacker Public Radio

Hacker Public Radio
Hacker Public Radio
Seneste episode

257 episoder

  • Hacker Public Radio

    HPR4637: UNIX Curio #6 - at and batch

    12.05.2026
    This show has been flagged as Clean by the host.

    This series is dedicated to exploring little-known—and occasionally useful—trinkets lurking in the dusty corners of UNIX-like operating systems.


    I would imagine that most users of UNIX-like systems have heard of
    cron
    —certainly any system administrator should have. Briefly,
    cron
    is a way of running a job repeatedly based on the time and date; for example, a job could run every hour, at 5:00am every Tuesday, or the 3rd of every month. It is commonly used for administrative or maintenance tasks that should be done on a regular schedule, such as checking for software updates, rotating log files, or updating the database for the
    locate
    command.



    As well-known as
    cron
    is, there is a similar utility that very few seem to be aware of:
    at
    . This is the word "at", and has nothing to do with the at symbol "@". An
    at
    job is very much like a
    cron
    job, except that an
    at
    job only runs one time. A job is submitted by running


    at




    timespec






    1
    , where
    timespec
    is the time and date the job is to be run. The linked POSIX specification page describes acceptable formats for
    timespec
    ; some examples are "
    now
    ", "
    14:00
    ", "
    noon tomorrow
    ", "
    14:00 + 3 months
    ", and "
    14:00 January 19, 2038
    ". The utility then waits on standard input for you to enter a set of commands to be run in the job. You end input by typing
    Control-D
    to mark the end of text. (As an alternative to typing in the job, you could instead use the "<" symbol to redirect standard input to come from a file containing the commands you want to run.)



    When the specified time arrives, the job will be run. That is the theory, anyway, but some things may interfere. The normal configuration for some implementations only checks for due
    at
    jobs every five minutes, so there can be a delay before a job is actually run. Also, if the system isn't running, obviously it can't execute any jobs. When it comes back up, typically it will check for any pending
    at
    jobs that are currently or past due and run those. It is best to think about an
    at
    job being run no earlier than the time it was scheduled for, and probably soon after, provided the system is up. The POSIX standard doesn't specify anything about when jobs are actually run, just that they are
    scheduled
    for a particular date and time.



    The user does
    not
    need to be logged in for a job to run—if the job outputs anything to standard output or standard error, that text will be e-mailed to the user, presuming the system is set up to send mail. This is often true for a server, which might be running a Mail Transfer Agent like
    sendmail
    ,
    postfix
    , or
    exim
    , but many desktops are not. If nothing is output to standard output or standard error, or if that output is redirected to a file, then mail will not be sent on job completion. This behavior can be changed with the
    -m
    option; in that case, mail will always be sent when the job finishes whether or not there is any output.



    The


    batch




    command is very similar


    2
    —POSIX specifies it as being equivalent to
    at now
    with two differences. First, jobs are put into a different queue, and second, mail is always sent when a job completes as if the
    -m
    option was used with
    at
    . In practice, however, certain aspects of the behavior of
    batch
    depend on the implementation.



    On the large majority of systems I investigated
    3,4,5,6,7,8
    , but not all
    9
    ,
    batch
    jobs will only be run when the system load level drops below a certain point. This can typically be configured by the administrator but has a default value—the manual pages for a couple systems don't actually list a default value and just say
    batch
    jobs will run "when system load levels permit". Basing execution on the load level makes sense if the
    batch
    utility is seen as a way of running potentially resource-intensive jobs when the system is not being heavily used. However, this behavior is not required by POSIX.



    Another question that the standard leaves unanswered is how queues behave. From the normal understanding of the word "queue", you might expect that each successive job is run one at a time once the previous job completes. However, this is not stated in POSIX, and some implementations explicitly allow a configurable number of jobs to run simultaneously. Manual pages for other systems simply don't mention the subject. (I researched this episode by looking at documentation for a number of BSD, Linux, and commercial UNIX systems, but didn't actually test out how they behave.) POSIX only requires systems to have two queues, one named "a" for
    at
    jobs and one named "b" for
    batch
    jobs, but allows implementations to have more. It says nothing about how different queues compete for resources—one implementation assigns a higher
    nice
    value to jobs in a queue whose name comes later in the alphabet, giving them a lower priority in the process scheduler.



    So what good are
    at
    and
    batch
    ? While I think they certainly meet the "obscure" requirement for a UNIX Curio, I have to admit they aren't particularly useful today. They were designed for an era where a typical UNIX-like system would run around the clock and had multiple users who might log in at various times of the day but weren't connected 24/7. In that context, using
    batch
    to run a job when the system is lightly loaded might be useful; nowadays, you can just run it whenever you like on your own machine. I have never actually used
    batch
    myself. On a machine where there is serious competition for resources among users,
    batch
    is probably not a sophisticated enough tool to manage their jobs—the NetBSD and Debian manual pages explicitly suggest using something different
    3,6
    . Supercomputing environments have even more complex requirements and a number of specialized solutions exist for scheduling jobs there.



    I
    have
    used
    at
    a couple of times. One example was for an organization I was part of that had paid for its domain name registration several years into the future. On the organization's server, I set an
    at
    job to e-mail the administrator a reminder to renew it a few months before the domain was due to expire. It was useful in that case because I didn't know whether I would even continue to be involved then, so a personal reminder for myself wouldn't necessarily help. But in my experience, administrative tasks don't tend to be one-off events. Instead, they repeat, making
    cron
    the right tool to use. For reminders, a calendar app is probably a better solution in most cases.



    While you might never have a use for
    at
    and
    batch
    , I still think it's good to know that they exist. Just be aware that you'll probably need to read the manual page on your system to fully understand how they will behave.



    References:







    At specification
    https://pubs.opengroup.org/onlinepubs/009695399/utilities/at.html





    Batch specification
    https://pubs.opengroup.org/onlinepubs/009695399/utilities/batch.html





    NetBSD 10.0 at manual page
    https://man.netbsd.org/NetBSD-10.0/at.1





    FreeBSD 15.0 at manual page
    https://man.freebsd.org/cgi/man.cgi?query=at&sektion=1&manpath=FreeBSD+15.0-RELEASE+and+Ports





    OpenBSD 7.8 at manual page
    https://man.openbsd.org/OpenBSD-7.8/at.1





    Debian 13 at manual page
    https://manpages.debian.org/trixie/at/at.1.en.html





    openSUSE 42.3 at manual page
    https://man.freebsd.org/cgi/man.cgi?query=at&sektion=1&manpath=openSUSE+42.3





    HP-UX Reference (11i v3 07/02) - 1 User Commands A-M (vol 1)
    https://support.hpe.com/hpesc/public/docDisplay?docId=c01922490&docLocale=en_US





    OpenSolaris 2010.03 at manual page
    https://man.freebsd.org/cgi/man.cgi?query=at&sektion=1&manpath=OpenSolaris+2010.03







    Apologies for the "tapping" sound that occurs in parts of this episode. I think my microphone must have picked up some electromagnetic interference.


    Provide feedback on this episode.
  • Hacker Public Radio

    HPR4636: 7 seconds memory

    11.05.2026
    This show has been flagged as Explicit by the host.

    There are two themes of the human experience that influence greatly our feelings and our behaviours: the memory, and the pain.



    Today we are going to talk about the first.



    Clive Wearing was a conductor, a musician, that lost a part of his brain. A virus, herpes simplex, that causes fever, in his case trespassed the barrier between blood and brain and caused an inflammation that damaged permanently the hypothalamus, responsible for memory.



    Immediately — after being cured of the infection by antiviral medicine —, he was a man with no memory. He couldn’t recognize his children — who, later, recognized they kind of abandoned the father, ceased the visits to him, because that condition was too sad for them.



    In the first moments, Clive was too angry, “I can’t think” was a constant. “Prisoner of the consciousness”, is the title of the TV documentary produced on him soon after the event.



    His wife — the second, not the mother of his two sons and one daughter — was his fullest “item” of memory — if we could picture memory as drawings in a piece of furniture, what of course is inexact, to say the minimum. He could still know, ever, that she, Deborah, was his wife; and, apart from his own’s, Deborah’s name was the only one he still knew.







    His angriness was surplice by a calm and gentle and gistful personality. Like, apart from the loss of memory, he kept two thirds of this personality: he definitely was Clive. (That observation is from one of his sons, in the documentary made 20 years after the first, called “7 seconds memory”). That is why Deborah, after divorcing him, and couldn’t having find another love (she was searching for Clive in other experiences, which she couldn’t find), later renewed the wedding vows with her husband; even though they couldn’t live together because of his need of constant supervision.



    The doctors — as the 2nd documentary, that is the line for this program, says — could not explain how he became more peaceful. I have a guess. Clive lost memory of events, he could not live in his mind any happenings. He knew her wife was his wife, but had no memory of the wedding; remembered having worked for BBC, but not one thing, not one activity, that he has done or participated. Maybe he have retained a little bit of what we could call (and I lack any technical precision here) descriptive memory. He could retain the old relations of a name with a characteristic, a face with the level of proximity he had with the person, as long as they (these relations) were verbalized in his understanding. Because he could not evoke any fact, he lost the (other term with precision) narrative memory — but words still made sense to him. So, in living the same day every day, with no time, no continuity, maybe some perception could have been engraved in his mind, unconsciously or not, even with the damaged memory, in the direction of going on
    (letting go)
    without despair. This is only a guess.



    Thank you.





    Provide feedback on this episode.
  • Hacker Public Radio

    HPR4635: What did I do at work today? Part 3 Section 1

    08.05.2026
    This show has been flagged as Explicit by the host.

    This is part of the documentation of an API class, documenting a particular a feature:-







    **Field:** actions

    **Value:** Create extra relationships

    e.g. set the type to 'contact'

    ```
    { "trigger": "update", "action": "add", "relationship": "7024", "child": "2085"}
    ```

    *Currently "update" is the only trigger and "add" is the only action.*









    Tools










    Joplin
    - Joplin is an open source, cross platform note-taking app. -
    https://joplinapp.org/










    PHP
    - A popular general-purpose scripting language that is especially suited to web development. Fast, flexible and pragmatic, PHP powers everything from your blog to the most popular websites in the world. -
    https://www.php.net/










    MySQL
    - MySQL is an open-source relational database management system. MariaDB is community driven fork of MySQL, often installing the MySQL package on a Linux distribution will actually install MariaDB. -
    https://en.wikipedia.org/wiki/MySQL
    -
    https://mariadb.org/
    -
    https://www.mysql.com/










    Sublime Text
    - Cross platform text editor -
    https://www.sublimetext.com/








    Typora - A simple yet powerful markdown reader - https://typora.io/









    Ubuntu / KUbuntu
    -
    https://en.wikipedia.org/wiki/Ubuntu










    Google Drive / Google Docs
    - Cloud based workspace, storage and office tools. -
    https://en.wikipedia.org/wiki/Google_Drive
    -
    https://en.wikipedia.org/wiki/Google_Docs










    Graph databases
    - A graph database is a database that uses graph structures for semantic queries with nodes, edges, and properties to represent and store data. A key concept of the system is the graph (or edge or relationship). The graph relates the data items in the store to a collection of nodes and edges, the edges representing the relationships between the nodes. -
    https://en.wikipedia.org/wiki/Graph_database










    Autojump
    - autojump is a faster way to navigate your filesystem. It works by maintaining a database of the directories you use the most from the command line -
    https://github.com/wting/autojump










    Object Oriented Programming
    - a programming paradigm based on the concept of objects. Objects can contain data (called fields, attributes or properties) and have actions they can perform (called procedures or methods and implemented in code). -
    https://en.wikipedia.org/wiki/Object-oriented_programming










    Grep, Silver Searcher & RipGrep
    - grep is a command-line utility for searching plaintext datasets for lines that match a regular expression. The Silver Searcher is a code searching tool similar to ack, with a focus on speed. ripgrep is a line-oriented search tool that recursively searches the current directory for a regex pattern. -
    https://github.com/ggreer/the_silver_searcher
    -
    https://github.com/BurntSushi/ripgrep










    Swagger & OpenAPI
    - The OpenAPI Specification defines a standard, language-agnostic interface to HTTP APIs which allows both humans and computers to discover and understand the capabilities of the service. -
    https://swagger.io/specification/










    Zeal
    - an offline documentation browser for software developers. -
    https://zealdocs.org/










    Ollama
    - a tool to get up and running with large language models, especially allowing installation on a local machine. -
    https://ollama.com/










    SSH Config
    - A file typically with the path
    '~/.ssh/config'
    used for setting options of the secure shell client that connects the terminal to remote computers. -
    https://man7.org/linux/man-pages/man5/ssh_config.5.html


    Provide feedback on this episode.
  • Hacker Public Radio

    HPR4634: Upgrade Failsause

    07.05.2026
    This show has been flagged as Clean by the host.

    https://rufus.ie/en/











    Kasa Smart Plug Mini with Energy Monitoring, Smart Home Wi-Fi Outlet Works with Alexa, Google Home & IFTTT, Wi-Fi Simple Setup, No Hub Required (KP115), White







    INIT STUFF







    Sudoers



    Apps



    apt update && apt install -y psmisc screen net-tools snapd pipx xbindkeys xbindkeys-config git nmap mono-runtime etherwake cloudflare-ddns mlocate samba







    # python pipx gahh



    su plex -



    pipx install python-kasa







    # sudo



    mkdir /root/PYTHONVENV/



    python3 -m venv /root/PYTHONVENV/



    pipx install python-kasa



    pipx ensurepath







    # update db



    mount -a



    sed 's/\/media//g' -i.bak /etc/updatedb.conf



    updatedb











    Contab



    0 0 * * * /usr/local/bin/cloudflare-ddns --update-now



    0 7 * * * /usr/local/bin/etherwake -i enp1s0 -D "d8:bb:c1:a2:2c:0b"



    0 3 * * * /usr/bin/veracrypt -d



    0 0 5 * * /usr/local/sbin/BSA.sh



    Mounts







    cat /etc/fstab



    UUID=2317187b-c592-46a7-8d8e-45c7d1eae7fc / ext4 errors=remount-ro 0 1



    UUID=61A0-586A /boot/efi vfat umask=0077 0 1



    UUID=db166a45-1afb-47dc-85cd-cbfcb06a9766 none swap sw 0 0







    # data



    UUID=dbb20dc6-9487-4510-9ab1-c7bbc3014cdb /media/data ext4 defaults,nofail,noatime 0 2







    # moredata



    UUID=5df24408-36ae-4205-8ecb-9d523dc4d820 /media/moredata ext4 defaults,nofail,noatime 0 2







    # backup



    UUID=c1aac0d2-73ca-4d95-883f-5e1f43b5cd13 /media/backup ext4 defaults,nofail,noatime 0 2







    Tunefs







    sudo tune2fs -c 5 -i 7d -C 1 /dev/sdd2



    sudo tune2fs -c 5 -i 7d -C 1 /dev/sdb1



    sudo tune2fs -c 5 -i 7d -C 1 /dev/sda1



    sudo tune2fs -c 5 -i 7d -C 1 /dev/sdc1















    XFCE



    Autologin



    # /etc/lightdm/lightdm.conf



    [Seat:*]



    autologin-user=plex



    autologin-user-timeout=0







    # Enable service



    systemctl enable lightdm











    UPower ( do not run pwrstatd )



    cat ./UPower/UPower.conf











    [UPower]



    EnableWattsUpPro=false



    NoPollBatteries=false



    IgnoreLid=false



    UsePercentageForPolicy=true



    PercentageLow=10



    PercentageCritical=3



    PercentageAction=2



    TimeLow=1200



    TimeCritical=300



    TimeAction=120



    CriticalPowerAction=HybridSleep







    PLEX



    RESTORE/BACKUP



    /home/plex/Library



    /media/moredata/_PLEX/usr/lib/plexmediaserver/



    Backup ?







    https://github.com/sinicide/ansible-vm/blob/master/roles/plex/files/pms-backup.sh







    Autostart Plex



    /home/plex/.config/autostart# cat PLEX_STARTUP.desktop



    [Desktop Entry]



    Encoding=UTF-8



    Version=0.9.4



    Type=Application



    Name=KODI_STARTUP



    Comment=KODI_STARTUP



    Exec=/home/plex/.local/bin/Plex.sh



    OnlyShowIn=XFCE;



    StartupNotify=false



    Terminal=false



    Hidden=false



    RunHook=0











    OMBI



    Sabnsbd+



    IDK ... ?!!?!?!?







    251 pipx install git+https://github.com/sabnzbd/sabnzbd.git



    252 pipx install sabnzbd



    253 pipx inject sabnzbd feedparser configobj cherrypy portend chardet cheetah3 puremagic guessit babelfish tmdbsimple



    254 pipx install sabnzbd



    255 python3 -m venv venv



    256 source venv/bin/activate



    257 pip install -r requirements.txt



    258 cat > ~/sabnzbd/sabnzbd-wrapper.sh << 'EOF'



    259 #!/bin/bash



    260 cd ~/sabnzbd



    261 source venv/bin/activate



    262 python3 SABnzbd.py "$@"



    263 EOF



    264 chmod +x ~/sabnzbd/sabnzbd-wrapper.sh



    265 sudo ln -s ~/sabnzbd/sabnzbd-wrapper.sh /usr/local/bin/sabnzbd



    266 sudo apt install unrar par2 unzip p7zip-full



    267 sudo apt install par2 unzip p7zip-full



    268 sudo apt install unrar par2 unzip p7zip-full



    269 which sabnsbd



    270 /usr/local/bin/sabnzbd



    271 apt-cache search unrar



    272 apt install unrar-free



    273 sudo unrar-free



    274 sudo apt install unrar-free



    275 /usr/local/bin/sabnzbd







    cat > ~/sabnzbd/sabnzbd-wrapper.sh << 'EOF'



    #!/bin/bash



    cd ~/sabnzbd



    source venv/bin/activate



    python3 SABnzbd.py "$@"



    EOF











    Sonarr



    Radarr



    Scripts



    Lights



    WatchDog



    # see kasa stuff ...



    /root/.local/pipx/venvs/python-kasa/bin/kasa --host WATCHDOG.localdomain off















    Sunshine/Moonlight



    # client



    snap install moonlight



    Plex HTPC (Snapd)



    snap install snapd



    snap refresh snapd



    snap install plex-htpc







    SMB/NFS



    apt install samba



    /etc/samba/smb.conf



    systemctl restart samba



















    VeraCrypt



    BlueTooth (Xbox)







    apt install bluetooth bluez bluez-tools rfkill



    bluetoothctl







    # hold little button on top ...then type scan on to turn scanning on



    # devices to list connected devices







    #1 under the batt cover



    remove 40:8E:2C:3A:9F:DA



    pair 40:8E:2C:3A:9F:DA



    trust 40:8E:2C:3A:9F:DA



    connect 40:8E:2C:3A:9F:DA











    remove 40:8E:2C:3A:A4:2F



    pair 40:8E:2C:3A:A4:2F



    trust 40:8E:2C:3A:A4:2F



    connect 40:8E:2C:3A:A4:2F













    Provide feedback on this episode.
  • Hacker Public Radio

    HPR4633: Ham Radio Licence

    06.05.2026
    This show has been flagged as Clean by the host.

    "The Foundation licence is your gateway to the world of amateur radio



    The course and exam that leads to the licence provides you with an exciting introduction to the hobby while ensuring you can operate safely and without causing issues to other radio users. The licence entitles you to a unique call sign which you use to identify yourself when transmitting.



    Foundation licences are issued by Ofcom, the UK’s communications regulator."



    From:
    https://rsgb.org/main/clubs-training/for-students/foundation/


    Provide feedback on this episode.

Flere Nyheder podcasts

Om Hacker Public Radio

Hacker Public Radio is an podcast that releases shows every weekday Monday through Friday. Our shows are produced by the community (you) and can be on any topic that are of interest to hackers and hobbyists.
Podcast-websted

Lyt til Hacker Public Radio, Borgerlig Tabloid og mange andre podcasts fra hele verden med radio.dk-appen

Hent den gratis radio.dk-app

  • Bogmærke stationer og podcasts
  • Stream via Wi-Fi eller Bluetooth
  • Understøtter Carplay & Android Auto
  • Mange andre app-funktioner