Recent Questions - Unix & Linux Stack Exchange |
- Extracting date from a string
- linux-tools-common when on a newer kernel version
- Wifi interface doesn't load when loading iwlmvm before iwlwifi
- Reading from stdin `dd` copies more data than reading the same thing from file
- How to reset this command `xset r rate 300 50`?
- Pop OS: How to switch to previous workspace?
- Shell script refer to another directory when building Dockerfile
- Finding default process scheduler
- Smooth movement for one mouse but not the other
- Is there a with context or function decorator in bash?
- How to control webcam's exposure time (using V4L2) based on the certain pixel's value?
- get all the files to be compiled from .config file
- In a Bash script, not able to use while and for loop together. Getting unexpected end of file error
- remove everything before a character in a column
- Motion doesn't detected my webcam : UNABLE TO OPEN VIDEO DEVICE
- Counting file extensions in a string array
- A2 on four A4 pages? | Convert A4 PDF to "A2 on four A4" PDF?
- Given we have the API /proc/pid/status should/could /proc/pid/stat be deprecated?
- ping echo request interval changes when there is no echo reply
- How to configure Pulseaudio to make laptop speakers and headphones work simultaneously?
- What is the avahi daemon?
- Route LAN traffic through VPN gateway
- How to check/fix nvme health?
- upgrade qt 5.6 to 5.9 in centos 7
- What is preventing Firefox from opening websites?
- Can't see GRUB menu on Boot, Chromebook
- Installing TOR on ec2 instance
- NFS Share on Centos 7 Fails to automount
- No access for user to shared libraries
- Why is my keyboard typing the wrong letters?
Posted: 16 Apr 2022 06:49 AM PDT I am trying to extracting date from a string but it is not obtaining. Code Output File format: Desired output: |
linux-tools-common when on a newer kernel version Posted: 16 Apr 2022 06:10 AM PDT I'm currently running kernel 5.16.15-051615-generic - I've landed on it while diagnosing and trying to fix an audio issue. Everything works great now so I'm reluctant to go back to 5.4.0 I'd like to install and use perf, but the linux-tools-common package in apt shows version 5.4.0-107.121. I've read that you need to use a version of the package compiled for your kernel version, and haven't found anything for 5.16. I guess that's to be expected - but how can I get a version for my kernel? Is there some in-development unofficial repository that has them? Or am I out of luck? If it helps, I used Ubuntu Mainline Kernel Installer to install the new kernel. |
Wifi interface doesn't load when loading iwlmvm before iwlwifi Posted: 16 Apr 2022 05:26 AM PDT I'm using a fresh Arch installation with KDE plamsa and NetworkManager. Sometimes when rebooting the wifi0 interface doesn't load. I found a temporary fix for this issue: Unfortunately this isn't really persistent. Because when after some reboots wifi0 still doesn't show up again. To understand what is going on here I tried and with this configuration my wifi didn't work too. So I assume that sometimes My question now is: Why doesn't wifi work when loading iwlmvm before iwlwifi? I would like to understand the underlying issue here. My network controller: |
Reading from stdin `dd` copies more data than reading the same thing from file Posted: 16 Apr 2022 05:28 AM PDT I encountered weird behaviour of the
But then I downloaded the already decompressed "*.iso" and ran:
I can verify that The
The Thanks in advance! |
How to reset this command `xset r rate 300 50`? Posted: 16 Apr 2022 05:15 AM PDT The title says it all. Machine: Debian 11 |
Pop OS: How to switch to previous workspace? Posted: 16 Apr 2022 04:20 AM PDT I want a keyboard shortcut for switching back and forth between (at least) the last two workspaces I visited. Something similar to how ALT+TAB switches between the previously-focused windows. Can this be done somehow in Pop OS 20 or 21? |
Shell script refer to another directory when building Dockerfile Posted: 16 Apr 2022 04:07 AM PDT I am using MacOS. My project directory structure is like this: In In my terminal, under project root I get docker error: I see it is a context related issue. could someone please elaborate for me what is the cause of the error & what is the right way in shell script to refer to another directory like this case? |
Finding default process scheduler Posted: 16 Apr 2022 02:40 AM PDT Where in the Linux code, I can find the default process scheduler at the time of launching a process. For a running process, Any thoughts on that? |
Smooth movement for one mouse but not the other Posted: 16 Apr 2022 05:21 AM PDT I'm using Bloody P91s Gaming Mouse my device and it isn't smooth on my Debian OS. It's displaying difference in acceleration on various axis. For example, if I move my mouse left-right over x-axis, the pointer proceeds to go down on y-axis. Also, it feels slower to move mouse pointer up whilst way much faster when I'm moving down. So I got myself a A4Tech OP-730D for testing and found out that the later one operates smoothly on any OS. I've tested on Debian, Ubuntu, Kali and PopOS - all have same results. However, It may be noted both mouse shows satisfactory performance over Windows and even on Linux VMs hosted on Windows. I've tried to find proper driver for the P91s for Linux over the internet but only found Windows executables. So I was hoping for a solution, may be any open source driver that works well for a gaming mouse like P91s on Linux. |
Is there a with context or function decorator in bash? Posted: 16 Apr 2022 04:20 AM PDT I use several small bash utility functions, which all start with "set -ux" and end with "set +xu". How can I avoid such repetition? In python, I'd use a function decorator or with-context, but I don't yet have a good idea for bash. |
How to control webcam's exposure time (using V4L2) based on the certain pixel's value? Posted: 16 Apr 2022 01:09 AM PDT I'd like to control the exposure time such that certain average value of certain window (e.g. 10x10+230+70) always fall between 100 to 220. /p.s. Camera is monochrome/ Something like following: I can do this with Python with OpenCV. I'm looking for another solutions Is there any solutions with |
get all the files to be compiled from .config file Posted: 16 Apr 2022 01:04 AM PDT I have an old kernel and I didn't manage to get the toolchain to cross compile it. So I decided to upgrade this version of the kernel. My question is how can I know all the files(source, blobs and probably scripts ) that will be integrated in the final kernel image bzImage ? Can I deduce this from .config/Makefiles ? |
In a Bash script, not able to use while and for loop together. Getting unexpected end of file error Posted: 16 Apr 2022 04:27 AM PDT getting error - syntax error: unexpected end of file |
remove everything before a character in a column Posted: 16 Apr 2022 05:59 AM PDT I have a table like this I would like to replace everything before Chr con column 3 My desired output would be I know that sed can do things like this: Could you please tell me how I could achieve this for a specific column or a couple of columns? |
Motion doesn't detected my webcam : UNABLE TO OPEN VIDEO DEVICE Posted: 16 Apr 2022 04:05 AM PDT I would use a USB webcam with Motion software, installed in Ubuntu on my Windows PC (WSL2 ) But when I started Motion as a service and i check on browser at the address [LOCALHOLST:port 8080 or 8081 ] it appears the Motion interface but never has been detected my webcam. Always It is showed a gray screen, for the MyCam1 option, with written at the top on the left "UNABLE TO OPEN VIDEO DEVICE". I tried many types of configurations in the camera1-dist.conf and motion.conf files, but unfortunately they still doesn't work Someone who could suggest me what type of configurations and in wich file, do I have to use to detected a USB webcam with Motion software ? Thank you in advance. Hi, i attached only the end of the output, after the sudo dmseg command : [ 4.426329] hv_pci e4b1fa33-c88f-4255-a486-270c24fb24e9: PCI VMBus probing: Using version 0x10002 [ 4.481630] hv_pci e4b1fa33-c88f-4255-a486-270c24fb24e9: PCI host bridge to bus c88f:00 [ 4.481633] pci_bus c88f:00: root bus resource [mem 0xbffe08000-0xbffe0afff window] [ 4.482359] pci c88f:00:00.0: [1af4:1049] type 00 class 0x010000 [ 4.485356] pci c88f:00:00.0: reg 0x10: [mem 0xbffe08000-0xbffe08fff 64bit] [ 4.486844] pci c88f:00:00.0: reg 0x18: [mem 0xbffe09000-0xbffe09fff 64bit] [ 4.488159] pci c88f:00:00.0: reg 0x20: [mem 0xbffe0a000-0xbffe0afff 64bit] [ 4.495400] pci c88f:00:00.0: BAR 0: assigned [mem 0xbffe08000-0xbffe08fff 64bit] [ 4.496019] pci c88f:00:00.0: BAR 2: assigned [mem 0xbffe09000-0xbffe09fff 64bit] [ 4.496607] pci c88f:00:00.0: BAR 4: assigned [mem 0xbffe0a000-0xbffe0afff 64bit] [ 4.519444] hv_pci 40b88200-f631-41d0-9e50-24f0a19b3b28: PCI VMBus probing: Using version 0x10002 [ 4.571731] hv_pci 40b88200-f631-41d0-9e50-24f0a19b3b28: PCI host bridge to bus f631:00 [ 4.571734] pci_bus f631:00: root bus resource [mem 0xbffe0c000-0xbffe0efff window] [ 4.572901] pci f631:00:00.0: [1af4:1049] type 00 class 0x010000 [ 4.575904] pci f631:00:00.0: reg 0x10: [mem 0xbffe0c000-0xbffe0cfff 64bit] [ 4.577026] pci f631:00:00.0: reg 0x18: [mem 0xbffe0d000-0xbffe0dfff 64bit] [ 4.578131] pci f631:00:00.0: reg 0x20: [mem 0xbffe0e000-0xbffe0efff 64bit] [ 4.584268] pci f631:00:00.0: BAR 0: assigned [mem 0xbffe0c000-0xbffe0cfff 64bit] [ 4.584855] pci f631:00:00.0: BAR 2: assigned [mem 0xbffe0d000-0xbffe0dfff 64bit] [ 4.585421] pci f631:00:00.0: BAR 4: assigned [mem 0xbffe0e000-0xbffe0efff 64bit] |
Counting file extensions in a string array Posted: 16 Apr 2022 02:03 AM PDT I have a The contents of the array look something like: file1.jpg file2.jpg file3.gif file4.mp4 I want to count how many of each file types there are. Currently I am doing this: but this is not optimal, because if a file is called EDIT: This seems to work: the EDIT 2: Later in the code I am checking file extensions in a loop with a |
A2 on four A4 pages? | Convert A4 PDF to "A2 on four A4" PDF? Posted: 16 Apr 2022 01:06 AM PDT Given e.g. pdf (in any size) how to enlarge it to A2 size and print on four A4 pages? (if possible it would be great if pdf having multiple pages we could split like this, so if there is pdf with posters to print multiple at once) (of course command line solutions proffered ;) ) |
Given we have the API /proc/pid/status should/could /proc/pid/stat be deprecated? Posted: 16 Apr 2022 05:44 AM PDT I have a few questions about the process information avaiable in GNU/Linux via procfs. This was originally prompted by a desire to extract vmPeak, vmSize, vmRSS & vmHWM from within an application. I started with the working assumption that
I realised this was not quite correct when I noticed vmPeak is only available from It seems that Given we have
I have just written parsers for both (though ultimately I binned the one for stat as the API is less useful). For machine readable there is not much in it. In fact the parser for 'status' ends up being more elegant as you can read it directly into any kind of key value store you like. Status seems easier to parse from any language and extensible. How many programs actually depend on 'stat' rather than 'status'? Do any of them really need the trivial parsing speed up that this might offer? Now I understand that stat couldn't be removed for years because of backwards compatibility but you could say 'this is now deprecated' unless there is a very good reason to keep it (which would be one possible answer to my question). If performance is an issue surely converting this kernel information to text and back via a virtual file system is less performant than a library call would be. It may be obnoxious to keep adding new APIs as this answer suggests but given that a great deal of this is stable why isn't there C library API like for example, sysinfo? |
ping echo request interval changes when there is no echo reply Posted: 16 Apr 2022 06:17 AM PDT I am pinging server2 (ip:2.2.2.1) from server1 (ip:1.1.1.1) at an interval of 1ms with flooding, using the command:
I am expecting to see ping requests leaving server1 every 1ms, which happens as long as there is a reply for the respective request, but if there is no reply for some echo request sequence, the interval of ping echo request packets changes to 10ms, then when reply resumes the interval changes again to 1ms. Is there a way to keep the ping interval to 1ms even if there is no reply? I went through some of the ping options but don't find one that will prevent the interval change from happening. Both servers are on centos 7. Thanks in advance. |
How to configure Pulseaudio to make laptop speakers and headphones work simultaneously? Posted: 16 Apr 2022 01:53 AM PDT I have a laptop with Ubuntu Eoan. Single soundcard, single headphone jack. I want to use both laptop speakers and headphones at the same time (no particular reason why, just because) but as soon as I plug in the headphones, the speakers become unavailable. I tried enabling simultaneous output, removing -switch-on-connect and -switch-on-port-available modules and making a virtual sink, but nothing works. Google search returns only the reverse problem, of people not wanting speakers and headphones to play at the same time. Anyone has any solutions? Output of |
Posted: 16 Apr 2022 04:20 AM PDT I just learning about daemon, by that time I came know avahi daemon can you please explain detaily about avahi daemon and why linux has a avahi user ? |
Route LAN traffic through VPN gateway Posted: 16 Apr 2022 02:54 AM PDT My iMac has software which connects to a remote VPN. It works well - but only that specific device. I now want to allow other devices on my network to access the same VPN connection via the iMac. The reason for doing this is because my phone cannot connect to the VPN itself as it does not support the OpenVPN protocol. I have enabled port forwarding with: I have tried to add the following to line 32 in my When I run
Can anyone tell me why I'm getting this error? Am i using the nat command incorrectly? FYI - I have been following the tutorial Set up Internet Sharing on Mac OSX using Command Line Tools |
Posted: 16 Apr 2022 01:03 AM PDT I'm running debian stable with a 2 x nvme Raid 1. This happens on both disks. One time it's nvme0n1p3 and next time it's nvme1n1p3. or and after the resync it works for a day or two. In dmesg I found this: I tried to check the health of the devices with these commands, but they don't give me stats like "Reallocated_Sector_Ct" or "Reported_Uncorrect". I only noticed the issue after apache failed to start and I repaired the filesystem with fsck.ext4 -f. Before I didn't have setup root mail correctly. So looks to me like a hardware error and I should get rid of both nvmes. |
upgrade qt 5.6 to 5.9 in centos 7 Posted: 16 Apr 2022 06:04 AM PDT CentOS 7 ships with Qt 5.6, is there a way of upgrading to Qt 5.9?. current version. I dont want to install Qt from qt.io, as I am not going to develop applications, the application I'm trying to run requires |
What is preventing Firefox from opening websites? Posted: 16 Apr 2022 02:04 AM PDT I solved my problem but I want to know what caused it for any future reference and better understanding. I have come across a strange behavior of Firefox on Ubuntu 14.04. I left office with my laptop turned on so I could listen to music. Before I left office, Firefox was working normally. Now I came to library, opened my laptop and Firefox and what happened was that Firefox was unable to open any pages, including Google.com. Firefox was running smoothly, without any delays, it just returned Server not found on any page I tried. What I did was, as usual in such cases, restart which also automatically starts to see if there is some strange Firefox background process running but everything appeared as usual. I am sorry but I didn't take a screenshot, my mistake. I closed Firefox and executed which means that At this point I was 100% sure there has to be something with the internet connection and not Firefox. So I decided to proceed with regular internet connection checking, that being executing Packets were flying which also eliminated possible DNS errors, although I have no idea how those could happen since I haven't done anything on my laptop and the network I was connected to was eduroam. I ran another command and it, as expected, returned HTML code of which basically means everything is ok. I was left out of options and I knew that restarting the laptop will almost certainly solve the problem, although I didn't even know what was causing it. I ran So my question is, does anyone of you know, what might cause such behavior? |
Can't see GRUB menu on Boot, Chromebook Posted: 16 Apr 2022 12:03 AM PDT I've installed Arch 2017.07.01 on a micro SD card in my Dell Chromebook 13 using this guide, and I'm using John Lewis' SeaBios to dual boot. I can successfully get into the boot menuand select the micro sd to boot from, but I then get a I've already tried doing a full reinstall of arch, commenting out Any ideas? |
Installing TOR on ec2 instance Posted: 16 Apr 2022 03:01 AM PDT As part of a research I am doing I am trying to install TOR package on a Amazon ec2 server. I have added the repo name to my repos configuration (following this tutorial: https://www.torproject.org/docs/rpms.html.en) When attempting to install the tor package using And so I tried to install Has anyone encountered this problem before? Any solutions would be a great help! Thank you in advance! |
NFS Share on Centos 7 Fails to automount Posted: 16 Apr 2022 05:05 AM PDT I have a fresh install of Centos 7. I cannot seem to auto mount an NFS share located on Mounting the share manually however, works perfectly. /etc/auto.master has been commented out completely to simplify the problem, save for the following line: /etc/auto.nfsshare holds the following line: /etc/credentials.txt holds: The expected behavior is that when I It does not. Instead, it shows nothing. The logs from sudo journalctl --unit=autofs.service shows this when it starts (debug enabled): The following appears in my logs when I attempt to force mounting of the nfs share via ls -l /tests/nfsshare: Additionally, ls -l /tests/nfsshare actually produces the error: How can I fix this issue? As stated before, manual mounting the share works fine. EDIT: as requested, output of |
No access for user to shared libraries Posted: 16 Apr 2022 04:03 AM PDT I use Debian and I have a problem with executing Can anyone explain me what is the mechanism that is blocking me ? |
Why is my keyboard typing the wrong letters? Posted: 16 Apr 2022 02:14 AM PDT While surfing with Iceweasel, I tried typing in a Web address, but I found, that every few keys, it started typing other letters instead of the ones I typed. For example, if I typed "c-c-c-c-c-c-c-c-c-c-c-c" it printed "ckexccccckex" or if I typed "a-b-c-d-e-f-g-h-j-i", it printed "abckexghi" instead.
How can I determine the cause? Could this be the result of a security issue? I am using Debian 7.0 with a Logitech K120 keyboard. |
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