Recent Questions - Unix & Linux Stack Exchange |
- centos to rockylinux migration failed & broke all the OS version detection, and dnf and yum
- File loses linefeeds after reading from file
- How to convert text file from lower-case to upper case and save as new file
- Why is the string format for VLC not working for my snapshots?
- Intermittent boot anomaly: has anybody heard of a system's screen going back to the startup image, a minute or so after the Gnome desktop comes up?
- what is the difference between == and -eq in an if statement? [duplicate]
- How to search a paticular Tag present in s3 file
- What is the mechanism behind shutdown on long-hold off power button, as opposed to quick press?
- Linux doesnt display prompt after using dd command on my custom block device
- ppp between two machines over serial without a modem with login
- gathering all files inside specific occurrences of directory recusrively
- Ubuntu: server is doing nothing, but memory is full
- Odd Issue with Sessions Originating form NATed Network
- Why does not Debian upgrade to Bookworm, even that sources.list defines 'testing'?
- can't get service to run on Rock64 SBC
- How are i2c driver modules exposing their devices in Linux?
- Audio and Video Play pauses Rapidly
- Where to put script in pam.d file?
- Rsyslog - Parsing audit.log / omprog change log value
- Make the regex find any word that contains at least one lower case letter
- Is there a way to check what newline characters your operating system uses?
- Skipping files when using grep
- Left Alt+tab and Left Ctrl+Left Shift+tab is not working on my external keyboard
- How to get rid of Konsole toolbar
- How to get a fuzzy xdg-open with fzf in zsh?
- Download data from DropBox to remote server (via scp)
- How to boot UEFI image from PXE?
- PCI Passthrough KVM with vfio-pci giving EINVAL on PCI Probe
- Get wine to honor system fontconfig settings (subpixel antialiasing, slight hinting)
centos to rockylinux migration failed & broke all the OS version detection, and dnf and yum Posted: 16 Aug 2021 11:18 AM PDT I tryied to rebuild dnf base after running the failed migration script (CentOS 8) it started but then it failed with "Unable to detect release version (use '--releasever' to specify release version)" I saw the os-release & redhat-release was cleared to "", nothing. I must try to make version detectable again to run a dnf makecache & dnf update to fix all of it but it cannot be done see below the dnf issues the migration process followed : Goal : retrieve a working centOS8 without reinstalling it all |
File loses linefeeds after reading from file Posted: 16 Aug 2021 11:09 AM PDT I have this bash script I read from the input file and output the contents to another file. When I open the output file, all lines are contiguous, without linefeed. When I do the and when I do the same for the output file I see How do I solve that? |
How to convert text file from lower-case to upper case and save as new file Posted: 16 Aug 2021 11:03 AM PDT Please would someone be able to explain how I can convert all the lower case characters in a text file to upper case and then save it as a new file? My file is called NewFile.txt and contains 500 lines of random characters. |
Why is the string format for VLC not working for my snapshots? Posted: 16 Aug 2021 10:52 AM PDT |
Posted: 16 Aug 2021 10:52 AM PDT This is a weird one. I have a new System76 Meerkat, running POP, and (intermittently, seemingly at random, maybe once out of 10 system startups), a minute or so after the Gnome desktop appears, the screen reverts to the System76 startup screen, at which point, the only thing it appears to respond to is the power button (which appears to simply initiate a normal power-down). It either happens within the first few minutes after the Gnome desktop appears, or it doesn't happen at all. It has happened while the system was completely idle, and it has happened while I was navigating the settings screen. And it has never happened twice in a row. For all I know, the Gnome desktop (and any open applications) might still be there, and might still be responsive to keyboard and mouse activity, but simply hidden behind that startup screen. I already have a support ticket open on this. |
what is the difference between == and -eq in an if statement? [duplicate] Posted: 16 Aug 2021 10:23 AM PDT Having the following for simplicity: If an input of a number is applied it works how is expected: Invalid option appears, but when any character is used how input always Valid option appears and it is not correct, but if is used (observe now All work how is expected from the beginning. So what is the difference between |
How to search a paticular Tag present in s3 file Posted: 16 Aug 2021 10:24 AM PDT Tried searching a particular tag for eg in a s3 file which contains many thousands of records using Now its throwing an err saying Can someone guide me how to extract data from a huge file with that tag. |
What is the mechanism behind shutdown on long-hold off power button, as opposed to quick press? Posted: 16 Aug 2021 10:24 AM PDT It is possible to control the behaviour of the power button using the 'HandlePowerKey' option in logind.conf. This is set to 'suspend'. A simple tap of the power button works as expected, suspending the OS. However, a long hold of the button seemingly overrides it and shuts down the computer. How does this occur? Reason I am asking, is it appears that a script in /lib/systemd/system-sleep does not execute correctly on long-hold power. |
Linux doesnt display prompt after using dd command on my custom block device Posted: 16 Aug 2021 09:37 AM PDT I have written a Linux block driver for a custom hardware device on my embedded system. The driver works fine but if I run a command (such as dd if=/dev/zero of=/dev/nvme bs=1M count=16), then after it completes I dont get a prompt displayed. I have to press the return key. Does anyone know what is causing this issue? Thanks |
ppp between two machines over serial without a modem with login Posted: 16 Aug 2021 09:17 AM PDT I have a problem similar to this with difference I have a getty (actually "agetty") over the serial line I need to use. To recap:
I tried several strategies but:
I did not (yet) attempt using "chat" simply because I don't really know how to use it. Any Ready-to-use recipe would be most welcome. |
gathering all files inside specific occurrences of directory recusrively Posted: 16 Aug 2021 09:27 AM PDT I have a project that has a lot of directories which contain files with extension These files are localizations in several languages. For example, I may have 3 files with the same name, like I am creating a bash script to list the directories where all these files are, by language. Example: I would like to scan the directory structure and find all For that matter, a command like that will do the trick on the terminal window but how do I store the result of such a command to an array that I can enumerate later, inside a bash script? I have tried this but because the paths contain spaces, the array is broken on that spaces, and I was expecting result to be an array where each line is a path, containing or not spaces. I am on macOS BigSur. |
Ubuntu: server is doing nothing, but memory is full Posted: 16 Aug 2021 10:59 AM PDT |
Odd Issue with Sessions Originating form NATed Network Posted: 16 Aug 2021 08:48 AM PDT I am having an odd Apache issue where one device of two devices on the same remote network will timeout at 60 seconds. I have been able to ext3end that to two minutes by setting TimeOut to 120 seconds, but the second device still loosing connection with the server. A get a generic 'Could not open the page as the server stopped responding' (Safari). My test is to load a simple page (php script that only prints date) on my desktop and on my iPad Pro. I wait exactly 60 seconds and refresh the iPad and I get the error. This result can be replicated on many end-user networks. My first thought was Apache needed to maintain a session for each entity on the remote network as Apache would see them originating from the same IP, but mod_session did not have any affect. The target server is an AWS Instance running Centos 7, Apache 2.4 (fully patched) and PHP 5.6.4. (I know, there is a project underway to update to Apache 7.X). I will note that this was not happening on a Centos 6 server running Apache 2.2, and the existing environment only has 4 or less users as it is a development environment. Any help would be greatly appreciated. Settings: httpd.conf: Timeout 300 Prefork settings: |
Why does not Debian upgrade to Bookworm, even that sources.list defines 'testing'? Posted: 16 Aug 2021 08:52 AM PDT After Debian 11 "bullseye" was released on August 14th, 2021, the Debian 12 "bookworm" is now the official "testing" distribution. Why is my Debian still on bullseye, instead of automatically updating to bookworm, even my sources all point to "testing"? Details of the steps I performed: and got several messages like: This is expectable. I accepted all questions with 'yes'. Then I did several times in a row, so all these commands now say: My /etc/os-release still shows bullseye after the upgrade: The testing distribution is correctly recognized as bookworm using distro-info command: I use these sources all the time (both before upgrade and after the upgrade): |
can't get service to run on Rock64 SBC Posted: 16 Aug 2021 08:28 AM PDT I have a python script that displays the current IP address and time to a LCD screen attached to my device (Rock64 SBC). The python script runs fine on it's own. Then the service code for lcd.service is this: systemctl status lcd.service displays: How can I troubleshoot this? |
How are i2c driver modules exposing their devices in Linux? Posted: 16 Aug 2021 08:28 AM PDT I am really new to kernel drivers, but want to learn about Linux system programming in general. I am also reading a good book at the moment, but I don't really get behind how I am supposed to communicate with the I2C devices. I am currently trying to get a heart rate sensor to work with the Raspberry Pi 4. Namely the MAX30102. I luckily found a Linux driver module in the kernel, which wasn't present in the Raspberry Pi kernel by default, but I could recompile the kernel successfully and load the module. I am assuming the device to be present at you can see that the device is successfully detected at address I don't really know how much the driver actually does. I have already got a temperature sensor to work for which I only had to load the I could proceed now using this guide about the I2C interface of the kernel. But this would feel like writing my own driver, which I could do, but would take me a few weeks at least. So am I supposed to communicate with the device using this API or shouldn't the device work out-of-the-box? From the driver module code it looks like it takes care of everything, but I am missing a documentation for it. For experienced users it is probably clear how to use that driver and I guess therefore there isn't a documentation, but I have no idea how to proceed. |
Audio and Video Play pauses Rapidly Posted: 16 Aug 2021 08:38 AM PDT While playing a video in any browser or in any of my laptop player, the video play-pauses automatically and very rapidly. This problem used to exist earlier when I used windows. thinking it's a OS problem I replace windows with Ubuntu. But the problem still exists. the only difference I see is during the problem while in windows the touchpad stopped working. Here in ubuntu during the troubling time the mousepad works, but the keyboard stops working properly. I couldn't diagnose this properly in windows but in Ubuntu.To test I opened the text file to check any keystroke. but nothing. I ran the xev command and evtest and found the following result printing hundreds of times. Please help me understand the above as I'm fairly new to linux, further pls suggest me ways I can diagnose this further and solve |
Where to put script in pam.d file? Posted: 16 Aug 2021 09:03 AM PDT I'm trying to add a script that will take a picture when someone unlocks my machine, as per this question. Right now, I have I have written a script that does this, and I found this question and answer useful - basically add the line However, this takes a picture every time my authentication is required/used. This is a bit of overkill for me, and I want to avoid this. Where/how can I add Also, is there a reasonably simplified resource explaining how |
Rsyslog - Parsing audit.log / omprog change log value Posted: 16 Aug 2021 10:37 AM PDT I'm trying to parse audit.log with rsyslog by using a bash script in order to transform the hex part of proctitle to ascii. However I do not get ressults: the file audit_ascii.log do not have lines with "proctitle" values. I tested the script and it is working fine so I guess the problem comes from my rsyslog.conf. rsyslog.conf: hex2ascii |
Make the regex find any word that contains at least one lower case letter Posted: 16 Aug 2021 09:58 AM PDT How to fix this regex so it finds any word that contains at least one lower case letter Smith(second name) Paul(first name) Text file The output of the regex |
Is there a way to check what newline characters your operating system uses? Posted: 16 Aug 2021 09:14 AM PDT I'm trying to run this open source bash script and it is not working because it is assuming I am running linux when it is parsing inputs. Actually, I'm running cygwin on a Windows machine. There is a spot in the script where it sets the $IFS to It would be easy to modify my local version of the script, but how would I fix this so it works on any OS? If I could run some command to get the newline characters, then i could assign them to $IFS. For some additional context, the code that's dealing with newlines is this: That test ends up comparing "null\r" to "null". |
Skipping files when using grep Posted: 16 Aug 2021 10:40 AM PDT How can I modify the following bash code to make it select files by a certain numeric value ? For instance The intention is to speed up the search process, but keeping the output sectioned one file at a time. One way to spped the process would be for different runs processing different files, for instance, by skipping files. As first attempt I have used But I am getting the error |
Left Alt+tab and Left Ctrl+Left Shift+tab is not working on my external keyboard Posted: 16 Aug 2021 09:31 AM PDT I have been using the EXTERNAL keyboard for the Linux Mint desktop. Note: If I use the Right ( Cntrl, Shift, alt ) keys for the above combination it works fine. And Left ( Cntrl, Shift, alt ) are working (not for the above combinations ) If there is a way to fix it, let me know. Edit: xev setxkbmap -print |
How to get rid of Konsole toolbar Posted: 16 Aug 2021 08:29 AM PDT |
How to get a fuzzy xdg-open with fzf in zsh? Posted: 16 Aug 2021 10:42 AM PDT THE QUESTION I've been trying to use fzf to bind a shortcut (preferebly Ctrl + o) to interactively search a file and pipe it to Of course, its behavior is a bit different from the behavior I want since it pastes the selected result to the command line instead of piping it directly to a command. The following bash script, though, has precisely the behavior I expected and running it does a much better job at explaining it than myself. I've also found this fish function with the same behavior, but fish's syntax is very different from POSIX compliant shells like zsh and bash so I don't know how helpful of reference that can be. Now then, does anyone know to bind Ctrl + o to an interactive fzf search that pipes its result directly to Thanks in advance! THE ANSWER Here's a working script, which I wrote based on this Stack Overflow answer. |
Download data from DropBox to remote server (via scp) Posted: 16 Aug 2021 10:02 AM PDT I'm trying to transfer some large, gzipped files from a collaborator's DropBox to a remote server. Is there a way to do this with Thank you in advance! |
How to boot UEFI image from PXE? Posted: 16 Aug 2021 11:02 AM PDT I would like to load Memtest86 image file from PXE. Unfortunately, their ISO file on site contains old version of Memtest, which load automatically with this config: Is it possible to boot this image as UEFI? |
PCI Passthrough KVM with vfio-pci giving EINVAL on PCI Probe Posted: 16 Aug 2021 09:04 AM PDT I am attempting to attach PCIe devices in passthrough to my KVM domain. I have two devices in one IOMMU group (#28): and I am running Ubuntu 14.04. I have:
So I do this to bind the devices to vfio-pci: Then: However, the multimedia controller appears AOK: 03:00.0 (which is a PCIe to PCI adapter) is not showing up under and under syslog I get what I believe to be the PCIe EINVAL code: What is causing this? Is this some issue with the presence of the PCI bus in the system behind the adapter? |
Get wine to honor system fontconfig settings (subpixel antialiasing, slight hinting) Posted: 16 Aug 2021 08:47 AM PDT A freshly compiled Wine-1.7.51 works almost fine, but it does not honor the system's (Gnome's) fontconfig settings. Specifically, it ignores subpixel rendering (using greyscale antialiasing if the system uses greyscale or RGB, and no antialiasing otherwise). It also ignores the hinting setting (None, Slight, Medium, Full). I don't know which it defaults to, but it always looks the same. Wine is built using the system fontconfig / freetype, which works fine, and supports RGB subpixel antialiasing and slight hinting (which is what I want). This is not one of the old bytecode interpreter or lcd filter issues with freetype, my system freetype is fine for me. I also tried multiple fonts; I know wine might override the settings for certain default fonts. I remember there was "one wierd trick" to get wine to use the right settings, but I forgot what it was (it was probably either a small source code change, or a custom fontconfig XML file that got loaded via environment variable). Any ideas? |
You are subscribed to email updates from Recent Questions - Unix & Linux Stack Exchange. To stop receiving these emails, you may unsubscribe now. | Email delivery powered by Google |
Google, 1600 Amphitheatre Parkway, Mountain View, CA 94043, United States |
No comments:
Post a Comment