Recent Questions - Unix & Linux Stack Exchange |
- Syncing back into the initial source directory?
- How to install .tar.bz2 files in Fedora?
- Linux -- programable menu application for wayland
- Incrementally Swap Lines Between Two Regex Patterns in a File
- Linux Command To Check If Users In /etc/passwd Exist In A Different File
- Search through on Linux files and filter out specific string and remove everything else
- Need help making a script that notifies me when my battery is low
- Getting Wireguard statistics without root
- What happens when I turn my ethernet off? What steps does the OS perform once I turn the ethernet OFF?
- Installing VirtualBox 6.1.22 conflicts with installed 6.0.20
- Debian everything-in-usr directory scheme (usrmerge) breaks dpkg -S. Work around?
- Messed up my GRUB on Fedora 34. Please help :)
- Cannot start process due error [closed]
- Match multiple pattern from a file and copy matching files in a dir to new dir
- While statement: Cannot get compound of multiple conditions to work
- Advantages of non preemptive kernel? [duplicate]
- Use awk or sed to remove everything between < >
- Airodump-ng fixed channel wlan0: -1 problem. awus1900
- Why can't I use the strings command on the strings binary?
- Fedora 33 - Run command or script at startup
- Files holder application like dropover and yoink for Mac
- Open a tmux session and then change to different user without password prompt
- FreeBSD 11.2 - Default resolution on console window
- how can we scp a zip file to another server and unzip it on the target server
- "ssh-add -d" refused to remove identity
- Is there a global nanorc?
- Mount BTRFS on Android (usb OTG)
- How to know if a disk is an SSD or an HDD
- Boot Linux system from a subdirectory on a partition?
- How can I kill a <defunct> process whose parent is init?
Syncing back into the initial source directory? Posted: 04 Jun 2021 10:38 AM PDT After syncing files from directory A to directory B, I dry runned (ran?) to see if directory B would have any files directory A would not have. The problem is that the dry run listed all of the files I have initially synced into directory B. I am not understanding something fundamental. If I would have to feed them back to each other, what command would be appropriate to do so? |
How to install .tar.bz2 files in Fedora? Posted: 04 Jun 2021 10:30 AM PDT I'm looking for ways to install, |
Linux -- programable menu application for wayland Posted: 04 Jun 2021 10:26 AM PDT I am using openbox window manager and I love the and I love it's menu concept where I can edit menu in XML and I can program it to call my scripts, open a terminal and open somethjing inside the terminal etc. It is wonderful! I created SSH buttons where each menu button connects to a remote server and it is flawless! Also when I open the menu, I can see the menu buttons and somehow remember applications that I might otherwise forget! Is there any similar menu that I can implement in sway (or gnome)? Rofi, wofi, dmenu... are not sufficient, because I can't store my own menu items there... I see these just as for example "Run" launcher in Windows 10 main menu. They should be only a launcher that is implemented standalone or as a part of the menu. But they can not replace the menu. So... Is there any openbox-like menu out there that I can implement in sway (or gnome)? It would bne the best if it is a native wayland application. |
Incrementally Swap Lines Between Two Regex Patterns in a File Posted: 04 Jun 2021 10:39 AM PDT I'm trying to do some text processing on a file using a bash script. The goal is to take all of the lines starting with "field:" indented under an 'attribute:' label and swap them with the associated line starting with "- attr:" that follows. So far I think I have regex patterns that should match the labels:
But I haven't had any success with the logic to parse through the desired fields and get them to swap correctly. Example Input Text Desired Output How would I go about accomplishing this? |
Linux Command To Check If Users In /etc/passwd Exist In A Different File Posted: 04 Jun 2021 09:01 AM PDT Is it possible to query the /etc/passwd file to view all user UIDS less than 200 and to check if those users are within a file such as /etc/ftpusers? So far, I have managed to craft the command below which lists out all users with a UID lower than 200, but I am not sure how to check if those listed users are within the /etc/ftpusers file. If any users are not in the file, I need the difference to be outputted. I have tried to use a for statement but it has not worked well. |
Search through on Linux files and filter out specific string and remove everything else Posted: 04 Jun 2021 10:13 AM PDT I am trying to find an efficient way of searching through a whole set of files in a directory and only looking for a specific string up to the first comma. Example of the postgres log file: I am only interested in the username used in the files. I could use pgbadger and look at it via HTML but would be quite time consuming. So as an example, I would be able to see just : As opposed to the whole set of text before and after the user. However I am looking for any user not specifically postgres. I have tried using grep on files but I only see results on just user=postgres. Is there anyway of searching through a set of files for say user= up until the first comma as an example? Or even search every file and remove anything that is before user= in each row, I could then maybe put into excel to get the result I need. Any help is much appreciated. |
Need help making a script that notifies me when my battery is low Posted: 04 Jun 2021 08:57 AM PDT I have a script that shows me the battery percentage in dwmblocks, in which I have also added the functionality to notify me when by battery percentage is low. but the way I've written it, it keeps sending a new notification until the charge goes above 20. how would I go about fixing that so that I only get the notification once? Note that the script is called every 5 seconds. |
Getting Wireguard statistics without root Posted: 04 Jun 2021 08:13 AM PDT I am writing a simple python webapp for monitoring wireguard VPNs; the data are obtained from the What are good practices for such a case? I have a few ideas:
What would you suggest? |
Posted: 04 Jun 2021 08:40 AM PDT I want to know what actually happens once I turn my ethernet OFF. What does the OS do on a network layer? Does it flush the routing table or anything like that. |
Installing VirtualBox 6.1.22 conflicts with installed 6.0.20 Posted: 04 Jun 2021 08:14 AM PDT On my CentOS 7 installation I am looking to upgrade VM VirtualBox. The downloaded installer runs through
But I don't want them to be compatible, I just want to install the new version. Why is the upgrade failing? |
Debian everything-in-usr directory scheme (usrmerge) breaks dpkg -S. Work around? Posted: 04 Jun 2021 09:33 AM PDT I'm used to using This sucks because the actual executable running is /usr/lib/systemd/systemd so I'm much more likely to want to know what package that came from in any given usage of |
Messed up my GRUB on Fedora 34. Please help :) Posted: 04 Jun 2021 08:08 AM PDT could someone tell me how to configure my grub to default mode? I've messed it up and now my screen resolution won't change. Here's what it looks like: GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)" GRUB_DEFAULT=saved GRUB_DISABLE_SUBMENU=true GRUB_TERMINAL_OUTPUT="console" GRUB_CMDLINE_LINUX="resume=/dev/mapper/fedora_localhost--live-swap rd.lvm.lv=fedora_localhost-live/root rd.luks.uuid=luks-c1746fc9-f349-4720-91da-29882322d1be rd.lvm.lv=fedora_localhost-live/swap rhgb quiet rd.driver.blacklist=nouveau modprobe.blacklist=nouveau nvidia-drm.modeset=1" GRUB_DISABLE_RECOVERY="true" GRUB_ENABLE_BLSCFG=true ~ EDIT: here's the output of what happens when I try to do grub2-mkconfig |
Cannot start process due error [closed] Posted: 04 Jun 2021 08:20 AM PDT When I try to start a process in my Linux Centos machine I get the following error: Any idea about how I could get this process started? |
Match multiple pattern from a file and copy matching files in a dir to new dir Posted: 04 Jun 2021 09:27 AM PDT How to copy files from dir1 to dir2, matching pattern in a file1? for example: file1: Dir1: I want to |
While statement: Cannot get compound of multiple conditions to work Posted: 04 Jun 2021 10:25 AM PDT I try to parse arguments by a The The problem now is that this way it goes into an infinite loop. To be exact, there are two while loops in the function. Either one of them or both are not working because the compound is syntactically (or logically?) wrong. Could you please check what might be wrong with the following code on the many levels possible? 1) Also what is correct? To put the checking-functions in a command substitution or not? Could it be that short-circuiting also prevents the Because that should absolutely stop the loop. On request of ilkkachu The test functions' code:
No it was just a try because I don't know whether or not I can just call the functions in the conditional without command substitution. For completeness' sake, I also add the And may the conditions maybe be formulated better with Could the exclamation mark be the point of failure? The following seems to be syntactically wrong: From the bracket |
Advantages of non preemptive kernel? [duplicate] Posted: 04 Jun 2021 09:12 AM PDT The Question is still unresolved since the duplicate answer was wrong (has a false claim as I explained in my last comment) I have seen the following question:
I am still confused why a non preemptive kernel will give any advantage, any idea or help is appreciated. |
Use awk or sed to remove everything between < > Posted: 04 Jun 2021 08:53 AM PDT I have the following in a txt file: and am trying to make it output as the following: To achieve this, I thought I would try removing '<', '>' and everything between them so it's left with just the list I'm trying to get. I tried the following sed command already: but this is outputting just the following: What am I doing wrong and how can I fix the sed command or translate it into awk if it is better use for that? |
Airodump-ng fixed channel wlan0: -1 problem. awus1900 Posted: 04 Jun 2021 08:22 AM PDT I have awus1900 adapter and use kali linux on vmware Driver for awus1900 I installed from this site: https://github.com/aircrack-ng/rtl8814au Before switching the adapter to monitor mode, I entered the command My system is completely updated. I tried to switch to monitor mode using the My monitor interface: wlan0 When I tried to catch a handshake using the I can enter the --ig flag in The comand: The program runs, but no effect Without --ig I don't know how to apply a kernel patch My Kali Linux version 5.10.0-kali7-amd64 |
Why can't I use the strings command on the strings binary? Posted: 04 Jun 2021 09:05 AM PDT I cannot run the I also can't copy it and try it on the copy of it: The only way I can get it is to capture the output in But there are other commands that this kind of self-referencing works with (e.g., I understand that this is a silly question with potentially no use case, but I am just curious... |
Fedora 33 - Run command or script at startup Posted: 04 Jun 2021 09:51 AM PDT In 2020 (last day today too), Fedora 33, what is the ideal way to run a command or script at startup? I am asking this again because over the years I have seen several different ways of doing it, some of which are now obsolete, so in 2020, what is the ideal way to do this? |
Files holder application like dropover and yoink for Mac Posted: 04 Jun 2021 08:15 AM PDT I've recently switched back from macOS to Linux Mint. The only thing I miss about Mac is having a utility that could hold my files for copying and pasting while I switch between the desktops. Yoink worked in a way that when you drag a file to a configured area (say left edge) a mini window appears. You can drag your files there and the window stays on that edge even if you are switching between the desktops. You can easily then pick the files and drop where you actually want those. This helped me in a lot of cases like:
I am starving for a Linux alternative. |
Open a tmux session and then change to different user without password prompt Posted: 04 Jun 2021 08:38 AM PDT I am trying to create a script that opens a new tmux session and then runs a command inside that tmux session as a different user. The purpose of this is to create a new tmux session for a game server, which has a different unix user assigned to it. I have heard that giving servers their own users was good practice, but I would still like to have a script in the home directory of my main user to start the server for convenience. I would like the tmux session to be available from my main user, yet be logged in to the game server user. The main problem is that there is a password prompt that I cannot get around, requiring me to attach to the tmux session, enter the password, and then detach. This is what I have tried: I have tried every combination of running the script with sudo, adding I am trying to find a solution which would allow me to type in my sudo password or the other user's password when I run the script which invokes tmux, instead of having to login by attaching and then detaching. |
FreeBSD 11.2 - Default resolution on console window Posted: 04 Jun 2021 10:04 AM PDT I installed FreeBSD 11.2 on my DELL Latitude E7470 with UEFI (might be important). By default it does not install a GUI and that is fine by me (for now). Using the I'm stuck with a 1920x1080 screen resolutionThis results in way too small characters for me to read comfortably.
Anyone has any ideas on how to fix this? |
how can we scp a zip file to another server and unzip it on the target server Posted: 04 Jun 2021 09:28 AM PDT I need to scp a .zip file to another server and then unzip it on the target server. How can I do that in linux |
"ssh-add -d" refused to remove identity Posted: 04 Jun 2021 08:18 AM PDT In order to forget private keys passphrase (id_rsa) i usually run: Now with macOS Sierra v10.12.1 i get this error: I searched google with no luck! |
Posted: 04 Jun 2021 08:46 AM PDT I've recently started using However, I do work across multiple accounts, so I manually have to apply the Is there a system-wide |
Mount BTRFS on Android (usb OTG) Posted: 04 Jun 2021 09:04 AM PDT I am using btrFS as a filesystem for my external harddrive. I'd like to use it under Android. Is there any painless way to do so? |
How to know if a disk is an SSD or an HDD Posted: 04 Jun 2021 08:22 AM PDT I want to know whether a disk is a solid-state drive or hard disk.
I search the net and there is nothing that explain how to know whether a drive is SSD or HDD. Should I just format them first? Result of |
Boot Linux system from a subdirectory on a partition? Posted: 04 Jun 2021 08:59 AM PDT I would like to try to set up a computer so that it has multiple Linux installs all in the same filesystem. For example, the filesytem would have 3 folders: (I know you can do this with BTRFS and subvolumes, but I would like to use EXT4 for speed). I once set up multiple installs of different distros using BTRFS, and from getting that working, I know Grub does just fine with booting the vmlinuz and initrd image from 'nonstandard' paths. But when I was doing the BTRFS thing, there was the I think for the other parts, I'm fairly close. I know how to specific a bind mount in I already know about virtualization and partitions, but that's not what I'm looking for. The target computer does not have enough power to do virtualization, and partitions do not share free space. I'm looking to set up a system that dual/triple/quad/etc boots linux distros, but that does it with one filesystem, so that there is no case of "I have free space, but it's in the wrong partition!' If anyone has suggestions how to edit my question or its title to be clearer, I'm all ears. |
How can I kill a <defunct> process whose parent is init? Posted: 04 Jun 2021 09:32 AM PDT Transmission is intermittently hanging on my NAS. If I send SIGTERM, it doesn't disappear from the process list and a I realize the best thing I can do is try and fix Transmission (and I've tried), but I'm a novice at compiling and I wanted to make sure my torrents finished before I start messing around with it. |
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