Recent Questions - Unix & Linux Stack Exchange |
- Regex to match on a single instance of a character
- Multiple monitors with xfreerdp and Xvfb
- No acceptable C compiler found in `$PATH`
- How to umount a script
- How do I restore the default sources.list file on Debian 11 (bullseye)?
- FLASK Installation
- Is my firewall configured OK?
- How do I disable systemd-controlled daemons running under user 'lp' account?
- When switching to tty, bluetooth headset is being disconnected
- Can't establish communication between two network namespaces using bridge network
- xmlstarlet command for batch processing .xhtml files
- HELP! My DATA is not showing but it exists!
- find, xarg, Awk Problem
- I can't recompile im-chooser in Fedora 34
- grep to extract unique capitalized phrases
- nftables: how to use the same map (or set) in different rules? (dnat & forward)
- hostapd on two interfaces (two configuration files)
- Can nftables and iptables/ip6tables rules be applied at the same time? If so: what's the order of precedence?
- How do I create a named set of interfaces by name in nftables?
- How to force OS reload of fstab?
- How to match both UDP and TCP for given ports in one line with nftables
- wifi not working, lenovo G50-70
- What is paging space in AIX?
- How to OCR a PDF file and get the text stored within the PDF?
- Is there any way of changing most keybindings to something more familiar?
- Disable touchpad while typing and also touchpad click for X session
- Debian 8 apt-get upgrade fails with Failed to fetch … Connection failed
- How to recursively find the amount stored in directory?
Regex to match on a single instance of a character Posted: 03 Oct 2021 09:58 AM PDT I have this thing that I maintain at work, and it has a pretty arcane DSL that it uses. And the tooling for it is not great. To deal with the poor tooling, I've written some scripts to try to find some issues with the code before I send it to production. The current problem I'm trying to solve has to do with variable names. Variables are named like '@@Variable@@'. If there is only 1 @, or more than 2 @s, then it is a fatal error. Right now I've got it looping through the files in question, and grepping for @@@ and raising an error when it finds 3 or more consecutive @'s. So that part is cool. But I'm sort of stuck on the single @. There can be more than one variable on a line. There are loads of permutations of the above, and there is no limit to the number of variables on a line. This awk script works if there is a single variable on any given line, but it doesn't work if there is more than 1 variable on a line.
What I really need to do is match anything where there is only a single instance of @. In the sample code above, it would match on all lines except line 1. |
Multiple monitors with xfreerdp and Xvfb Posted: 03 Oct 2021 08:50 AM PDT I am trying to start an X server with multiple screens on a single Xvfb like this: and start an RDP connection which will use those two screens: This doesn't work like this, the xfreerdp process crashes. I've tried some combinations of Thanks for any answers or even hints! |
No acceptable C compiler found in `$PATH` Posted: 03 Oct 2021 09:31 AM PDT Am trying to install
What can I do? |
Posted: 03 Oct 2021 08:48 AM PDT Cron periodically has root run a script to backup certain partitions to an external USB drive. The script first removes the oldest backup, then backs up specific partitions and finally writes the result to a backup log file. I want the drive to unmount when the removal, backup and print finish their work. I had no problem for many years simply with a final line: umount /mnt/backup. But more recently the umount fails. I understand that I cannot safely do a lazy umount and it seems that option is deprecated. I've tried prefacing the umount command with lines like sleep 10 and cd /. What final lines in the script will cleanly unmount the device for me? |
How do I restore the default sources.list file on Debian 11 (bullseye)? Posted: 03 Oct 2021 08:38 AM PDT I installed Debian 11 (Bullseye) onto a device with no internet. I used the "firmware CD" version of the ISO. I have configured the network, so I can do I found this question, but it is for Debian Jessie, not Bullseye. I would also like |
Posted: 03 Oct 2021 07:50 AM PDT I was trying to install FLASK(Full-sky Lognormal Astro-fields Simulation Kit) on my ubuntu PC, but I don't quite understand the manual and have been unable to use it. Whenever I try to run the basic command it says no file or directory found. Please tell me what I am doing wrong. The github repository that I am using is github. And how do I complete the install and try to run it? |
Posted: 03 Oct 2021 08:19 AM PDT Why is |
How do I disable systemd-controlled daemons running under user 'lp' account? Posted: 03 Oct 2021 06:55 AM PDT I see various systemd-controlled daemons running under the For example, I see a My question is: Is there a clean way to disable (mask) systemd service units for a specific user account, if that user account is a non-login account? I'm running Ubuntu 20.04 and systemd 245 (245.4-4ubuntu3.13), in case that's relevant. |
When switching to tty, bluetooth headset is being disconnected Posted: 03 Oct 2021 07:09 AM PDT I have a bluetooth headset connected to my computer. Whenever I switch to a different Steps:
What happens: My headset says "bluetooth disconnected". Audio playback stops. This is independent from the application which plays audio (music players, web browsers, …) What do I expect to happen: My headset should stay connected. Audio playback should continue. I'm using Fedora 34 with GNOME/Wayland. |
Can't establish communication between two network namespaces using bridge network Posted: 03 Oct 2021 05:49 AM PDT I'm following this video about network namespaces in Linux, and trying to practice it myself, but for some reason it doesn't work. What I've done is: After creating 2 network namespaces named "blue" and "red": Now, if I try to ping from the red to the blue or vice versa, it doesn't work. The weird thing is, that ARP does work, so there is connectivity between the interfaces. I know this because when I run So you can see that the red namespace, in its ARP table, has the MAC address of the blue namespace's veth, so why then ping doesn't work? |
xmlstarlet command for batch processing .xhtml files Posted: 03 Oct 2021 06:25 AM PDT I've tried xmlstarlet for processing an individual .xhtml files. This command process an individual files and prints output on terminal only. How to batch process multiple files and save results on |
HELP! My DATA is not showing but it exists! Posted: 03 Oct 2021 06:48 AM PDT Yesterday, I asked a question on how to stop Linux from asking me to put my sudo password every time I want to write on my second partition (https://askubuntu.com/questions/1366877/stop-asking-for-sudo-on-reading-or-writing-files-on-mnt-my-partition). I tried to change the owner of the partition using the solution of a user answered my question, but his solution (for some reason) did not work. So I was busy to find another solution and left it as it is. today after rebooting I found that all the data on the partition disappeared! But when I tried to look carefully on the size of the partition, I noticed that it's not empty, it shows that there is 7 GB of data exists on it. But the thing that I don't understand is that I can not see the files. So I opened a terminal to see what I can find and here is the output: The output from the The output from the The But the output from the disks utility shows that there is about 7 GB of data exists on the partition, which is the actual size of the data I had on that partition Yesterday. Also, Nemo (a file explorer) shows that there is Data on the partition: Here is a screenshot
I'm not sure if this output is going to be useful: /mnt/Data: is my second partition which I have my 7 GB data on Here's the /etc/fstab file output: I'm using Linux mint If you need other information, feel free to reply in comments. Important: Please note: the /mnt/Data partition is a FAT partition and NOT an ext4 as I mentioned, my mistake. |
Posted: 03 Oct 2021 08:34 AM PDT I have the command: Which works perfectly to go through my txt files in the directory, parse the value(s) and write the final csv file with the header (Name, Number). My issue is that I have "too many" and so I modify it with find and xarg: This has worked in the past, but now I find that -- on occasion -- the header is written more than once to the final csv file. I don't know why. It does ssem to be related to the total number of txt files in the directory such that if I hit a certain number, this happens, but I am not really sure. thanks. |
I can't recompile im-chooser in Fedora 34 Posted: 03 Oct 2021 05:52 AM PDT I have a problem in my Fedora 34 with one package which i can't recompile using rpmbuild --rebuild from Fedora 22 to 34, cause it gave me an error which I can't repair. |
grep to extract unique capitalized phrases Posted: 03 Oct 2021 08:16 AM PDT The snippet below produces a list of all capitalized words from input text: Now I would like to extract and count the occurrences of unique capitalized phrases of any length. That is, I'd like a tally of unique strings of space-delimited words sharing initial capitals. A given unique phrase would not include punctuation or a non-capitalized word, so "University of British Columbia" would be two phrases, 'University' and 'British Columbia'. Example Input: "Harvard archaeologists in Mexico also participated in the International School of American Archaeology and Ethnology in Mexico City with scholars from Mexico, Prussia and the United States." Example Output:
Note that in the example, 'Mexico' and 'Mexico City' are two different unique phrases sharing one word. |
nftables: how to use the same map (or set) in different rules? (dnat & forward) Posted: 03 Oct 2021 05:54 AM PDT I am setting up a firewall + NAT using I want to use one common data structure (set or map) to configure both DNAT and filtering rules (forward). When I try ( Here is the example I use (see UPPERCASE COMMENTS). These are the map & set: And these are the rules: It would work if |
hostapd on two interfaces (two configuration files) Posted: 03 Oct 2021 08:59 AM PDT I have two wireless interfaces and I want to run different APs on each. (Neither hardware supports multiple SSIDs.) I have a This works fine: The problem is getting it to work automatically. One claim is to set in but this doesn't work because the whole string is interpreted as being one file -- which doesn't exist. I see this is used by However, I also see something called (what does |
Posted: 03 Oct 2021 07:01 AM PDT The question is pretty much already in the title: Can nftables and iptables/ip6tables rules be applied at the same time? If so: what's the order of precedence? The reason I ask is this: plenty of tools - especially from the realm of containerization - still rely on Or is this catered by using As for the order of precedence I'd appreciate a diagram of sorts, if available to show where rules have which precedence. |
How do I create a named set of interfaces by name in nftables? Posted: 03 Oct 2021 06:30 AM PDT Using sets in nftables is really cool. I am currently using a lot of statements like these in my In the rule above I've the approach below, but this does not work with the errors given:
Is there really no way of naming the anonymous set I've shown on the top? |
How to force OS reload of fstab? Posted: 03 Oct 2021 09:09 AM PDT 'mount -a' works fine as a one-time action. But auto-mount of removable media reverts to settings that were in fstab at the last reboot. How to make the OS actually reload fstab so auto-mounts use the new settings when media is connected? Specific example seen with Raspbian (Debian) Stretch:
FWIW, the (updated) fstab syntax was: |
How to match both UDP and TCP for given ports in one line with nftables Posted: 03 Oct 2021 06:07 AM PDT How can i do this in a single line? |
wifi not working, lenovo G50-70 Posted: 03 Oct 2021 09:06 AM PDT I have just installed UBUNTU 16.04 LTS/ I have problem with Wifi. I can't enable wifi in my laptop. I have lenovo G50-70. The output for network-manager is already the newest version (1.2.6-0ubuntu0.16.04.2). It's showing me only bluetooth and nothing about wireless. I have Windows 8.1 on this computer too and wifi is working properly. I don't get any respond. Vendor's name: I found: Broadcom BCM43142 Wireless LAN Driver (802.11b/g/n) for Windows 7 (32-bit, 64-bit) - Notebook |
Posted: 03 Oct 2021 08:05 AM PDT I get that Paging Space in AIX is actually like SWAP in Linux. In one of my AIX servers at work, i'm actually seeing 99.7% Physical memory being utilized when my application is running(handling quite some data). Most of the time Server is utilizing 95% of Physical memory(RAM). From the pic attached, we can see Paging Space is being utilized. And i believe my Application can run little faster if i upgrade RAM. But i am not able to convince the management. They say that still Paging Space is there and until it's utilized fully, no need to upgrade RAM. Isn't paging Space actually in Hard Disk ? OS actually transfer data between Paging Space(Hard Disk) & RAM back & forth in case of High Memory Utilization ? Can someone please shed light that if i am using up 99.7% of Physical Memory - RAM in Server,it's a Good reason to upgrade RAM ? Note: I'm posting here as a last resort and in need of proof to convince my management to upgrade the RAM in my server before Christmas, as i will be seeing quite a lot of data during Christmas. So Please, before down-voting, at least help me what's wrong with my question and help me get an answer. |
How to OCR a PDF file and get the text stored within the PDF? Posted: 03 Oct 2021 07:30 AM PDT First, apologies if this has been asked before - I searched for a while through the existing posts, but could not find support. I am interested in a solution for Fedora to OCR a multipage non-searchable PDF and to turn this PDF into a new PDF file that contains the text layer on top of the image. On Mac OSX or Windows we could use Adobe Acrobat, but is there a solution on Linux, specifically on Fedora? This seems to describe a solution - but unfortunately I am already lost when retrieving exact-image. |
Is there any way of changing most keybindings to something more familiar? Posted: 03 Oct 2021 08:28 AM PDT
As I don't want to learn a whole new set of keybindings for my pager (no matter how fancy and wonderful it is), is there any way of making |
Disable touchpad while typing and also touchpad click for X session Posted: 03 Oct 2021 06:05 AM PDT I have done a lot of googling for disable touchpad click and disable touchpad while typing and found a lot of answers. However most of them are related to a desktop enviornment. I do not use a DE. So, I need to:
and
|
Debian 8 apt-get upgrade fails with Failed to fetch … Connection failed Posted: 03 Oct 2021 07:01 AM PDT Debian 8 "Jessie". CLI-only home-use server. "apt-get upgrade" always fails with "E: Failed to fetch ... Connection failed ..." errors. "apt-get update" appears to always succeed. Problem has been occurring for days. Upgrades were previously succeeding without issue. Recently re-sized the /home and /var drive partitions but cannot think of any other major changes. Have attempted to include several mirrors in /etc/apt/sources.list but none succeed. My sources.list file is: Example of errors encountered: No proxy is defined in /etc/apt/apt.conf or /etc/apt/apt.conf.d Attempting to download the failed URLs on a different, desktop computer through a web browser also fail with connection errors. Perhaps related, attempting to download netinstall images with a desktop web browser from cdimage.debian.org always fail with a "The connection was reset" error. My Arch Linux desktop computer can upgrade packages fine. |
How to recursively find the amount stored in directory? Posted: 03 Oct 2021 05:42 AM PDT I know you are able to see the byte size of a file when you do a long listing with So I want to know how much storage is in a certain directory recursively? I'm guessing, if there is a command, that it would be in bytes. |
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