Recent Questions - Unix & Linux Stack Exchange |
- My nmcli hotspot broke down since an update, how can I troubleshoot the cause?
- Insert a text at a certain position with sed command on an xml file
- How to unmount all other drives at boot
- Symmetric Permutations MAXIMA
- Echo contents of for loop automatically
- Why do I need to specify `-o auto` for join's `-e` option to work?
- How to make a directory only accessible by local user not remote root user?
- Add a disk into volume group
- Configuring VPN connection
- PCS illuminant is not D50
- How to start the service in Linux
- Copy all unique files from multiple directories into one. Rename duplicate names & preserve extension file.png, file (1).png
- Can deleted groups still function through primary groups in Linux?
- In what segment does mmap allocate memory
- Bash script with getopt fall into "default" the second argument
- How can i get permission to copy files from one folder to another?
- Raspberry Pi bridge eth0\eth1
- Using `openssl` to display all certificates of a PEM file
- How to check if a terminal can display undercurl from within a bash/zsh script?
- Minor kernels updates applicability for people running custom kernel builds
- How can I make GNU mailutils to use an external SMTP server?
- Cannot record microphone with SimpleScreenRecorder
- dd command on running system makes backup image with older versions of files
- how can I set a right click and open terminal in context menu
- udevadm rule works using "udevadm test" but not with "udevadm trigger"
- Find latest files
- Automount post-unmount script
- Restricting who can send to an email address
My nmcli hotspot broke down since an update, how can I troubleshoot the cause? Posted: 21 Mar 2022 07:42 AM PDT Hey I got a fedora desktop PC in my student dorm that I use as a hotspot. I use a hotspot created with I have been using this for the last few years and had no issues with it. Last week I did some updates and since then most of my devices can't connect to the hotspot anymore. The Machines I have are: 2 Latops(work and privat), Iphone, and Nintendo switch.
Im really not sure which device is the cause. I can connect to the hotspot of my iphone so that makes me think my desktop pc is the reason. But then I was also able to connect with my laptop before updating. How can I check what the cause of all this is? And is it possible to undo |
Insert a text at a certain position with sed command on an xml file Posted: 21 Mar 2022 07:39 AM PDT I'm trying to figure out how to insert a text in an xml file with sed command. I started to try some basic commands with sed : it's adding this line but not in the position that I want The problem for my specific case is that the text should be add to a certain position (certain bean as it's a java config file) Example I want to add this property to the bean named 'BEAN_ID_1' before the enclosing tag so the output will be : PS: I can't rely on line number since in production I have no Idea how is the file Can anybody help me on this ? Thanks a lot |
How to unmount all other drives at boot Posted: 21 Mar 2022 07:36 AM PDT So, I got an Ubuntu running from an external drive, which I am using at different laptops. I got one with Windows, and one with a Lubuntu (this laptop has only got 16 gb internal storage). What I am afraid of, that Ubuntu will write to one of my other systems, and make them unusable. I am trying to find a way to automatically unmount all other drives that the system detects. Any ideas? |
Posted: 21 Mar 2022 07:23 AM PDT I would like to attribute a value of permutations like this: A:[a,b,c]:value permutations(A) I will have the 6 permutations of A as 6 lists, can I attribute a function to these 6 lists, for example: [a,b,c] : 1 * value [a,c,b]: (-1)^a+b+c * values [b,a,c]:(-1)^a+b+c * values ... I hope I am clear Best regards |
Echo contents of for loop automatically Posted: 21 Mar 2022 07:35 AM PDT I often use a for loop to i.e. convert a bunch of file formats. In some cases, where text transformations or variables occur, it would be nice to check if the substitutions were performed correctly. Is there an easy way to show the performed command? Following the example above, something along the lines of: |
Why do I need to specify `-o auto` for join's `-e` option to work? Posted: 21 Mar 2022 07:09 AM PDT With the following two simple files:
The following command does not behave like expected: I would expect the option Reading documentation from Is there an explanation? Or should I file this as a bug to coreutils? |
How to make a directory only accessible by local user not remote root user? Posted: 21 Mar 2022 06:50 AM PDT I have a CentOS 7.9 machine, logging in as my normal user account and access a directory that has my forms and SSN in it. Other users in the network who has the root account can ssh to my box and access these files (Everyone can ssh to any machine on the network and become root). How can I prevent them from doing so? |
Posted: 21 Mar 2022 07:08 AM PDT my environment is configured like that ORACLE LINUX 8.X i want to extend a filesystem mounted as /a01 with xfs filesystem. i have an existing virtual disk with 50Go /dev/sdc partitionned with fdisk /dev/sdc1. my current volume group the output of pvdisplay -m /dev/sdc1 Why i cannot extend my lv and my vg ? thanks for the help . ------I removed the disk from the vg |
Posted: 21 Mar 2022 06:13 AM PDT Was configuring VPN connection with IKEv2 with strongswan. When i was to connect from ubuntu to vpn server, i need to copy CA from server, into the /etc/ipsec.d/cacerts folder on my own laptop. Then I'm adding into /etc/ipsec.secrets login on my home machine, and password, that are in the same file on server, which acts as VPN. After i need to configure /etc/ipsec.conf, that is going to connect to VPN. The content of the file is as follows What if i have a few servers, and i want to switch between them. Either one is not working, or the speed is not satisfying. It requires to have two different certificates. If those VPN servers configured to have different certificates, and different IP addresses, is there a way to switch between VPN servers easier, then going into the setting, and manually changing IPs and logins? |
Posted: 21 Mar 2022 06:28 AM PDT I am trying to convert the following JPEG image into PNG: but I fail to understand what ImageMagick is trying to tell me. Steps: with: I understand that I can use the |
How to start the service in Linux Posted: 21 Mar 2022 06:05 AM PDT I wrote such a tutorial script to run the service mysleep The service just on the command start starts sleep 10d and on the command stop kills the process on its pid After running the command service mysleep start I get an error Failed to start mysleep.service: Unit mysleep.service not found. |
Posted: 21 Mar 2022 06:02 AM PDT I'd like copy all unique files from multiple directories into one. Rename duplicate names & preserve extension file.png, file (1).png etc. At least I'd like to merge all files from all directories and preserve extension. Obviously |
Can deleted groups still function through primary groups in Linux? Posted: 21 Mar 2022 06:26 AM PDT With an analyzing program I built, I ran into a bug where a user had a primary group set to a since then deleted group (no longer in the /etc/group file). To scope the impact I ran some tests and run into what appears to be some strange behaviors:
It appears that for the rights check in sudoers, both the /etc/group file and the primary group of the user are searched separately and the primary group therefore doesn't have to be an actual group? Question: Is this correct? What am I missing? I'm not sure why the client had a primary group deleted, but this doesn't seem right. Device specs: Linux Ubuntu 20.04.1 5.13.0-1017-azure x86_64 Steps to reproduce:
|
In what segment does mmap allocate memory Posted: 21 Mar 2022 06:06 AM PDT I thought first that it was the heap, but it seems to allocate memory in a different place. radare2 tags it as folowing:
Since it is not the heap, what do we call the segment where |
Bash script with getopt fall into "default" the second argument Posted: 21 Mar 2022 07:04 AM PDT I am re-learning And some examples: |
How can i get permission to copy files from one folder to another? Posted: 21 Mar 2022 07:38 AM PDT So i was trying to copy some files from one folder to another using the so then i tried to execute the same command with After i tried to see the permissions of each folder: but then i don't know what to do next because i don't know how to understand the data. Can somebody help me solve this problem? [EDIT] So i tried to see if i had root access, but is shows me this: And then i tried to install |
Posted: 21 Mar 2022 07:01 AM PDT I have a Raspberry Pi and a device/sensor which connects to the Pi via eth1. Eth0 is connected to my router, giving access to the internet. I'd like to bridge my eth0/eth1, so that traffic from the device can go to the internet. I'd like to do this using a netplan. Here is what I have so far: How can I tell my system to use this netplan? Is it configured correctly? Do I need to use I really have no idea what I am doing here, so any help would be appreciated. |
Using `openssl` to display all certificates of a PEM file Posted: 21 Mar 2022 06:00 AM PDT I can use the following command to display the certificate in a PEM file: But it will only display the information of the first certificate. A PEM file may also contain a certificate chain. How can I display all contained certificates? |
How to check if a terminal can display undercurl from within a bash/zsh script? Posted: 21 Mar 2022 06:28 AM PDT How to check if a terminal can display undercurl from within a bash/zsh script? In a recent project I used undercurl escape sequence for output printed by a zsh script. It works well in modern terminals, but Apple's Terminal.app shows that as a reversed background-foreground. It would be nice to be able to detect if the terminal has the ability to display undercurl, and only then use undercurl or default to regular underline. |
Minor kernels updates applicability for people running custom kernel builds Posted: 21 Mar 2022 07:45 AM PDT Imagine the situation. You're running a custom kernel which you compiled from the vanilla sources using your own How can you determine for sure that I was thinking of this:
This will not work. Modules might match (I'm not even totally sure about that) but This has to be skipped somehow. In other words I'm looking for a reproducible kernel build which ignores any local variables. There's TuxMake but I cannot figure out how to use my custom .config and nothing else. |
How can I make GNU mailutils to use an external SMTP server? Posted: 21 Mar 2022 05:27 AM PDT Does anybody on this planet know what the equivalent GNU according to the GNU mailutils manual I tried:
this is not a duplicate of can-i-set-up-system-mail-to-use-an-external-smtp-server as they used a local MTA or heirloom-mailx or |
Cannot record microphone with SimpleScreenRecorder Posted: 21 Mar 2022 06:35 AM PDT As mentioned in the title, I'm unable to simultaneously record my headset microphone and my desktop audio when using SimpleScreenRecorder in KDE Neon 5.24. In the "Audio Input" section of the recording settings, I selected "PulseAudio" as Backend, whereas for Source I've tried both "Built-in Audio Analog Stereo" as well as "Monitor of Built-in Audio Analog Stereo" (see below): When selecting "Built-in Audio Analog Stereo", the microphone gets recorded but the desktop audio does not, while the situation is exactly the opposite when I select "Monitor of Built-in Audio Analog Stereo" (can record desktop audio but not headset microphone). Does anybody have an idea of how to solve this issue? |
dd command on running system makes backup image with older versions of files Posted: 21 Mar 2022 04:26 AM PDT I use these commands in a script to create an image backup of an SD card while a Linux OS is running on it -- OpenWrt. The rootfs is 1000MiB so I only dd the first 300 blocks. This way I can restore the boot and root filesystems in the backup to any other sd card I like using Win32 Disk Imager, (selecting "Read Only Allocated Partitions") However, when I gunzip and mount the created .img file I see that certain files I was working on... the latest versions of them were not backed up but instead the backup contains older versions of those files. Recent edits I made before running the backup script are not included in the backup. I thought that using the sync command before the dd command in my script would flush caches so the latest versions of all files would be backed up? I know that best practice is to unmount the filesystems on the sd card before running the dd command but my use case will not allow me to do that. What else am I doing wrong? Cheers. |
how can I set a right click and open terminal in context menu Posted: 21 Mar 2022 05:01 AM PDT I am using Debian 10.1 See the following screenshot. I am used to a Ubuntu environment where I do a right click and terminal opens. Is this kind of a thing possible for Debian environment. If it is possible please let me know how can I enable it? If the same can be added to context menu like in the screenshot I see following three options edit based on discussion below package gnome-tweak-tool and nautilus-extension-gnome-terminal were installed. Then when required setting were not found as in videos here Still the desired results have not been achieved. What I want is I do a right click on any area on my desktop and in the context menu I want to see an option to open terminal. |
udevadm rule works using "udevadm test" but not with "udevadm trigger" Posted: 21 Mar 2022 07:04 AM PDT I have created a simple rule called "99-usb.rules" that simply names a tty port of a specific device This rule works fine when I run a udevadm test with the command Running this command causes "/dev/mydevice" to appear, and I can communicate with my usb device through "mydevice". The problem is, I can't get this rule to be triggered outside of the test environment. I have tried "udevadm control -R" and "udevadm trigger" aswell as disconnecting and reconnecting the device and rebooting my system. Any ideas why "udevadm trigger" would fail? I am using udev version 173 on OS OpenWrt Barrier Breaker 14.07. |
Posted: 21 Mar 2022 05:11 AM PDT How do I find out the most recently accessed file in a given directory? I can use the Is that possible? |
Posted: 21 Mar 2022 05:22 AM PDT My intention is to spin-down an external USB drive after 20 minutes of not being used. In the normal case I would use Then I head of It spins down the disk for less than one second and then immediately spins up again. Even if the filesystem is not mounted. Then I found out that indeed spins down the disk but also unmounts it. The next idea was to use automount to mount the drive when someone accesses its mount-path in the filesystem. Mounting works but after the drive unmounts, it doesn't spin down. What I want to do is to execute the eject command as above after automount unmounts the drive. Do you have any ideas how to do that? Or even better do you have an easier solution? |
Restricting who can send to an email address Posted: 21 Mar 2022 06:01 AM PDT I'd like to do so that only certain From: addresses can send to an email address (mailing list) on an Ubuntu system running Postfix. Understanding the Postfix the manuals are requires a lot of knowledge, so I'm hoping to get a complete recipe I can use. Currently this is what I have: This gives: I am open to any suggestions. It doesn't have to be Postfix. It can be procmail or any other standard solution. Note: the recipient is a mailing list, and thus does not have a user account on the system account. So any solution must work without an account. Current mailing list implementation |
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