Do not use #!/bin/sh if you’re not writing bash-only scripts
Actually #!/bin/sh is for bourne shell compatible scripts. Bash is a superset of the bourne shell, so anything that works in bourne should work in bash as well as in other bourne compatible shells, but not vice versa. Bash specific syntax is often referred to as a “bashism”, because it’s not compatible with other shells. So you should not use bashisms in scripts that start with #!/bin/sh.
The trouble is that it is very common for distros to links /bin/sh to /bin/bash, and it used to be that bash being called as /bin/sh would change its behavior so that bashisms would not work, but this doesn’t appear to be the case anymore. The result is that people often write what they think are bourne shell scripts but they unintentionally sneak in bashisms… and then when those supposed “bourne shell” scripts get run on a non-bash bourne compatible shell, they fail.
You may also want to check if your bios is up-to-date.
My 5900x had some spontaneous crashes and reboots when I just got it, a bios update eventually resolved it. This was around the time zen3 was just out, and there were still quite a few bugs in AMD’s AGESA library, which is included in the motherboard’s bios.
Many motherboards still ship with an ancient bios, or just have been sitting on a shelf somewher for a very long time with an old bios. So if you have never touched your bios, check that first.
So far there’s subscriptions for cruise control, adaptive beams, various navigation options, apple/google integration and my favorite, dual-zone climate.
Goodbye warranty then. Many manufacturers have already been doing that with chip tuning, which is also just a software modification. When you take your car in for service they read out the ECU to detect chip tuning, and your VIN gets flagged in their system if it has been modified. So if at some point in the future you make a warranty claim, you are SOL.
Then there’s also the technical barriers they’re putting up, locking them down so unauthorized software can’t be flashed to them (much like Apple’s iphone and ipad crap).
Has anyone a good explanation why the second way is bad practice? Or not recommended?
They’re functionally the same. It’s like the difference between mkdir somedir and mkdir ./somedir. The leading ./ is not necessary, so I guess you could consider it less clean, but I wouldn’t lose any sleep over it.
this kind of structure could actually be dangerous
citation needed
I mean, tarbombs exist, but not because of the leading ./ as far as I know and they’re usually specifically crafted tar files to create harm, not something you accidentally create yourself while tarring stuff.
If my tar contains the following folder ./home/user/ and I extract it in my current home folder (which would be kinda stupid but It happens) this will overwrite the home folder
No it will not. It will extract your files to /home/user/home/user, so a nested home directory inside your home directory (yo dawg).
The man page section you quote is about absolute paths. That is, paths that start with a / without a leading dot. They indeed can be dangerous, but by default (GNU) tar strips absolute paths and will throw a warning like:
<span style="color:#323232;"># tar -cf test.tar /etc/hosts
</span><span style="color:#323232;"> ^leading slash
</span><span style="color:#323232;">tar: Removing leading `/' from member names
</span><span style="color:#323232;">
</span><span style="color:#323232;"># tar -tvf test.tar
</span><span style="color:#323232;">-rw-r--r-- root/root 184 2022-12-08 20:27 etc/hosts
</span><span style="color:#323232;"> ^no leading slash
</span><span style="color:#323232;">
</span>
<span style="color:#323232;">~# tar -h
</span><span style="color:#323232;">tar: You must specify one of the '-Acdtrux', '--delete' or '--test-label' options
</span><span style="color:#323232;">Try 'tar --help' or 'tar --usage' for more information.
</span><span style="color:#323232;">***********************************************
</span><span style="color:#323232;">WARNING: Self destruct sequence initiated
</span><span style="color:#323232;">***********************************************
</span>
and if I make some server-like setup with multiple drives, I’d go with some kind of raid with redundancy instead of just stitching the drives together (or mb yolo and raid 0).
Server setups are usually virtual machines nowadays, with virtual disks (i.e. vmdk or qcow2 files in a storage pool). Stitching virtual disks together is valid in this case because redundancy is handled on another level, invisible to the vm.
I mean… Young people don’t know things yet… Isn’t that normal?
Depends on the context I guess. If this is a professional IT context in which the 25yo is expected to be proficient enough on a Linux system to edit a text file, not knowing that vim exists is kinda sad.
SDDM crashed with some error about the theme: I haven’t looked into it yet though. For the time being I disabled SDDM and reverted to console login and startx.
All my kwin window rules stopped working. Apparently, the window title matching string now should include the window class (i.e. “urxvt URxvt” instead of just “urxvt”), so I had to redo all my window rules.
ksysguard is gone, together with all my customized monitoring pages and its replacement plasma-systemmonitor is broken. It’s complaining about missing sensors, and core dumps on some screens.
Some of my custom keyboard shortcuts were not working anymore. Had to reconfigure them.
Desktop overview is gone, replaced with something that has less functionality: I can move windows from the currently selected desktop to another one, but I can’t drag windows between desktops.
The Breeze theme now shows a very thick (and IMO ugly) outline by default. Thankfully you can tune or disable it in the settings.
Floating taskbar by default is also not my thing, but easy enough to disable. New “edit mode” feels a bit janky though.
When navigating between panes in System settings, it often shows the “apply settings” dialog even when no settings have been changed. Stop gaslighting me ksystemsettings, I know what I clicked.
Resizing the window of some (but not all) applications now produces a kind of rubber banding effect: like the contents of the window get stretched and then snap back into place multiple times during the resize. It looks and feels really janky. It doesn’t appear to affect QT and GTK applications, and Firefox isn’t affected either. Applications that are affected: chrome/chromium, vscode, freetube, tigervnc, urxvt, xterm and all the x* utilties. Turning off compositing “fixes” it, but who wants to run a desktop without compositing nowadays?
Screen locking is completely broken. When I press Meta+L, instead of simply showing me the lockscreen, the display turns off and starts to flicker on and off multiple times while showing just a black screen and a mouse cursor. After a while the lockscreen does appear, and I can type my password to unlock but instead of showing me my desktop it dumps me back to a black screen with a mouse cursor. After a while, if I’m lucky, the desktop reappears. One time my entire system froze and rebooted (!) before I got my desktop back, and I lost my unsaved work. I disabled automatic desktop locking for the time being, and am fighting against my muscle memory to press Meta+L whenever I leave my desk.
Mouse cursor does not always obey the selected cursor theme, so depending on which window I hover over I get the white Breeze Light cursor or the black Adwaita cursor… Oddly enough, it’s the new QT6 applications that get the Adwaita cursor. I couldn’t replicate this on a “fresh” desktop with a clean user account, so it must be something in my existing settings that caused b0rkage in the 5 to 6 transition.
Can’t toggle mpv to fullscreen. The F key does nothing, neither does the –fullscreen switch.
Lots of small but annoying issues here. Nothing that really makes my desktop unusable, but hunting down plasma settings was not how I imagined spending my evening. So far not too impressed…
I gotta say, it’s working. I pirate a lot less than a few years ago. Not because I’m afraid of getting sued, but because it’s all shite not worth pirating nowadays.
And then firefox broke apulse again due some sandboxing permissions, and you had to override it with some about:config flag: security.sandbox.content.write_path_whitelist
So that worked for a while and then the audio in some proton games stopped working, and that’s when I said fuck it and gave up. I’m only prepared to play the whack-a-mole game for so long, and if the solution to pulseaudio flakiness becomes even more alsa related flakiness, it’s not worth it anymore.
General Advice for shell scripts
What do you advice for shell usage?...
deleted_by_author
The New Audi A3 Is Amess With In-Car Subscriptions (www.motor1.com)
So far there’s subscriptions for cruise control, adaptive beams, various navigation options, apple/google integration and my favorite, dual-zone climate.
KDE Plasma 6.0.2 (kde.org)
The bugfixes are small but important and include:...
[SOLVED] Tar: what's the implication of the ./ and ./file structure in the tar file?
Solved...
deleted_by_author
tar -vczfx123 ought to do it (imgs.xkcd.com)
source...
A Beginner's Guide to LVM in Linux - tchncs (discuss.tchncs.de)
Great job (lemmy.world)
And don't forget RTFM (lemmy.world)
KDE 6 FOR ARCH LINUX IS HEREEEEEEE (lemmy.ml)
Plasma 6 just landed in Arch (archlinux.org)
Film Companies Seek 'Torrenting History' Related to Redditor * TorrentFreak (torrentfreak.com)
Pipewire vs PulseAudio: What's the Difference? (itsfoss.com)