Recent Questions - Unix & Linux Stack Exchange |
- Dynamic swap file with systemd swap unit
- Why anbox is not found on the Application Finder of Ubuntu 20.04 with XFCE4?
- gpg: can't open 'file.pgp': No such file or directory
- Redirecting output from within disk operations does not work
- How to set Open File Dialog path explicitly?
- bash I/O redirection - how to append to stderr
- What does `ln /path/to/file -i` does in context of setuid'ed script?
- How to proceed to enlarge /boot
- grep (or sed?): skip a specified number of lines before looking for matches
- Can't read or mount MicroSD card (ext4) on Asus X205T (Q4OS)
- Is something wrong with my Puppy Linux installation?
- Extract fields and substrings and merge sorted lines
- How to continue script commands, functions & variables after chroot?
- How to configure a GUE receive tunnel in Linux for IPv6
- Does the override.conf file change the actual service file conf?
- How do i overlap bash subshell with dialog guage in a bash script?
- veth interfaces performance problem
- How to fix ".service: Start request repeated too quickly." on custom service?
- GVIM : Shortcut for finding end for particular begin in SystemVerilog language
- New Intel i350 NIC not detected by system, but appears in lspci - Possible Intel IGB issue?
- Bash: calculate the time elapsed between two timestamps
- How to open Vim in Terminator by default?
- How to get Bluetooth working on Arch Linux?
- Setting classpath for Java
- Convert non-RAID disk with data into RAID 1 disk (hardware controller)
- reinit NFS client without restart
- OpenLdap - restore backup - slapcat/slapadd
- Is there a way to check for a working polkit agent without checking for running process?
- force rsync to overwrite files at destination even if they're newer
- cat files with directory
Dynamic swap file with systemd swap unit Posted: 14 Jun 2021 10:11 AM PDT On each boot a temporary partition is mounted at I need to set a swapfile on it which is half the size of the partition. Is this possible with systemd swap unit? I think I can do this with a systemd service unit incorporating a dedicated script that makes the swap file and activates it, and that depends on the temporary partition being mounted. But a swap unit doesn't have this functionality of executing scripts, hence I wonder whether I am on the right track? |
Why anbox is not found on the Application Finder of Ubuntu 20.04 with XFCE4? Posted: 14 Jun 2021 10:02 AM PDT My goal is to install anbox in Ubuntu 20.04 and run it through PuTTy (with X11 Forwarding, can it be done?) or Widnows Remote Desktop Connection. My actual result: Installation successful. However I can't find anbox using the application finder. My expected result: I can find anbox using the application finder. What I did Output of |
gpg: can't open 'file.pgp': No such file or directory Posted: 14 Jun 2021 09:57 AM PDT I Was decrypting a file.pgp file, and the file is present in the directed. The powershell script is able to read the name of the file but not able to open it. it says below error: gpg.exe : gpg: can't open 'file.pgp': No such file or directory The code works successfully fine for sometimes and sometimes it shows the above error. Can anyone let me know what can be issue, that the same decryption code works fine for some runs, but decryption fails for some runs. |
Redirecting output from within disk operations does not work Posted: 14 Jun 2021 09:57 AM PDT I am not able to successfully redirect STDOUT+STDERR on commands that operates with disks. Standard redirecting which always works, is somehow now catching the output. Two practical examples: Example 1: Example 2: Interesting is, that this only happens when touching disks somehow. All other redirects within the script works as expected. Any ideas? |
How to set Open File Dialog path explicitly? Posted: 14 Jun 2021 09:47 AM PDT DescriptionI'd like to point a folder so any application will start its "File Open Dialog" in it. How can I do that? RationaleI'm naturally using many applications while working on a project, like FreeCAD, LibreCAD, VLC, SimpleScan, etc. It's frustrating to navigate to my work folder for every single one of those applications. If I could set such a path, any application will start that dialog within my work folder, so I can easily handle my files. |
bash I/O redirection - how to append to stderr Posted: 14 Jun 2021 09:12 AM PDT I have a script that loops over some big collection of data and performs some lenghty operations. Then i need to and the output: the "progress bar" messes up the output a little - so i was wondering:
of course in reeality i dont know wow many items there are (at least not out-of-the box). So i was wondering if this can be acieved by some stream redirection |
What does `ln /path/to/file -i` does in context of setuid'ed script? Posted: 14 Jun 2021 08:31 AM PDT I was making bash script with setuid permission on, but it doesn't work. So I found my solution here: Now my script works fine and all (I rewrote it in cpp). To satisfy my curiosity as why pure bash shell didn't work, I read this link: http://www.faqs.org/faqs/unix-faq/faq/part4/section-7.html (referenced by this answer: https://unix.stackexchange.com/a/2910 ). At that site, I came across such command: What I didn't understand is fourth line that said The question is: what do that command do? I've read in |
How to proceed to enlarge /boot Posted: 14 Jun 2021 07:45 AM PDT I know how to use gparted on a livecd to resize partitions, but here it's a bit more complex and I don't want to screw it up. I have a Seems to me, before I can enlarge As you can tell, I don't have a clear understanding of the relationship between |
grep (or sed?): skip a specified number of lines before looking for matches Posted: 14 Jun 2021 07:21 AM PDT I'm working with huge log files that accumulate over days that I can't truncate/rotate but need to parse new entries hourly. I've been using I've already ingested on all prior loops, but of course this means inefficiently grepping the whole file every loop. I'm relatively unix naive, but I feel like there's a more efficient way to do this? I don't think Any suggestions? |
Can't read or mount MicroSD card (ext4) on Asus X205T (Q4OS) Posted: 14 Jun 2021 08:38 AM PDT I have hard time with MicroSD card on Asus X205T. I can see device with lsblk, but it can't be mounted and read, it doesn't read filesystem and stuff. Distro: Q4OS. Filesystem: ext4.
Output for Here is Output for Output for |
Is something wrong with my Puppy Linux installation? Posted: 14 Jun 2021 07:11 AM PDT |
Extract fields and substrings and merge sorted lines Posted: 14 Jun 2021 07:50 AM PDT I have a file consisting of 5 tab separated fields (irrelevant fields are empty in this example). Desired output: Steps:
This yields what is shown in the first block above. How do I go on from here? I know how to grep the domain only, but the isolated domains don't help much in achieving the desired output lines. I am not restricted to |
How to continue script commands, functions & variables after chroot? Posted: 14 Jun 2021 08:32 AM PDT I have written a BASH script that would prepare and install everything during ArchLinux initial installation. The script would work fine and execute everything successfully until it reaches the Also, the solutions I found online (like the Here is a demo: I googled for a solution but none of the solutions that I found have worked for me. I'm a Linux noob. Thank you. |
How to configure a GUE receive tunnel in Linux for IPv6 Posted: 14 Jun 2021 08:36 AM PDT I am trying to configure a GUE tunnel to receive IPv6 packets that contain GUE encapped IPv4 packets but I am having trouble de-encapsulating the packets. The IPv6 packets have a GUE encapsulated packet inside of which has a IPv4 packet. I setup a receive tunnel on my end. This is what the resulting ip6tnl0 looks like: On my other machine I can curl the $VIP which is a IPv4 address and on my machine through tcp-dump I can see the encapped packets So when that UDP packet is decapped properly, I would expect it to contain an IPv4 packet matching the source IPv4 of $VIP. But when I run I do not see anything. I have repeated this exact same setup for IPv4 (IPv4 packet encapped inside IPv4 packet using GUE) for which the setup for the receive tunnel is similar: In which case I can see the decapped packets $VIP above is a virtual ipv4 address that is serving http traffic. Any ideas what is wrong with the way my IPv6 receive tunnel is setup? |
Does the override.conf file change the actual service file conf? Posted: 14 Jun 2021 09:51 AM PDT I have created an The file has this in it now: My However, the |
How do i overlap bash subshell with dialog guage in a bash script? Posted: 14 Jun 2021 08:29 AM PDT I might as well have gotten the title wrong. But if the explanation leads to a successfully solution then maybe someone can kindly suggest a title. I'm debugging a very old script. It is an installtion script for some local program. The script is running just perfectly fine. This script is implemented with a progress bar using dialog --gauge. Each progress has its own subshell. At some point the first progress wouldn't exit automatically after the code is done. The result of this script is successfull and the programm is installed as needed. But the problem is the first shell doesnt exit itself unless i press To get out of this i use Is there a way to make the first subshell after Not forgetting, this script is being run in another bash script which is also being run from another bash script. Just extra information maybe it might help out solving the case. Thanks in advance to anyone who might be able to help out. |
veth interfaces performance problem Posted: 14 Jun 2021 08:38 AM PDT On a fast AWS machine ( I then start sending around 7kb/second of data per server. When sending to about 500 servers everything goes well, but when I send it to around 600 servers, timeouts begin to occur. The connection to the server can take more than 3 seconds to be executed, as I have tested. It's not a lot of processing (for such a server) and it's not a lot of data. Is the Linux I have created a git repo to reproduce the problem. Any help would be highly appreciated. |
How to fix ".service: Start request repeated too quickly." on custom service? Posted: 14 Jun 2021 08:30 AM PDT I'm learning how to create services with systemd. I get this error: I can't start the service any more; it was working yesterday. What am I doing wrong?
My system is Debian 9.8 Stretch all updates. |
GVIM : Shortcut for finding end for particular begin in SystemVerilog language Posted: 14 Jun 2021 08:01 AM PDT Need a shortcut for finding the |
New Intel i350 NIC not detected by system, but appears in lspci - Possible Intel IGB issue? Posted: 14 Jun 2021 08:37 AM PDT I'm running into an issue where a new network card isn't being automatically detected by the OS. I recently purchased an Intel I350 gigabit network card. I have purchased this card before and I have used it in other systems with the same OS with no issues. This is the card https://ark.intel.com/products/84805/Intel-Ethernet-Server-Adapter-I350-T4V2. The odd thing is that this card is being detected by Windows, but not Oracle Linux, CentOS Live, or Ubuntu Live. "nmcli d" output These are the onboard adapters. The 4 Intel ones are not detected. "lspci | grep Network" output The OS appears to at least know of the existence of the PCI card. This is the output of "lshw -class network" I noticed that the card is detected here as well, but it is listed as "UNCLAIMED". How do I go about making the system "claim" the card? I have tried using the drivers listed from Intel's website, but it didn't seem to help. I could've also have been doing something wrong too. I don't have much experience with linux drivers. Any help would be greatly appreciated, Thank you! |
Bash: calculate the time elapsed between two timestamps Posted: 14 Jun 2021 07:19 AM PDT I have written a script that notifies me when a value is not within a given range. All values "out of range" are logged in a set of per day files. Every line is timestamped in a proprietary reverse way: yyyymmddHHMMSS Now, I would like to refine the script, and receive notifications just when at least 60 minutes are passed since the last notification for the given out of range value. I already solved the issue to print the logs in reverse ordered way with: that results in: Anyway, I'm stuck at calculating the number of seconds between two of those timestamps, for instance: What should I do in order to calculate the time elapsed between two timestamps? |
How to open Vim in Terminator by default? Posted: 14 Jun 2021 08:34 AM PDT I installed Terminator as the default terminal, you can see it in the screenshot. But when I launch Vim through the menu it opens at the gnome-terminal. I tried to change the settings in System: Linux Mint 18 Cinnamon 64-bit |
How to get Bluetooth working on Arch Linux? Posted: 14 Jun 2021 09:20 AM PDT I have the BCM423142 chip on my laptop, recently I've installed Arch Linux (Antergos) and downloaded the WiFi works perfect but Bluetooth doesn't, it only appears as powered off in the gnome-panel. I have this output from the dmesg | grep Bluetooth command: I have this output from lsmod | grep blue I have this output from the bluetooth command: I've already tried with this Installation and this Configuration via the CLI and none works. |
Posted: 14 Jun 2021 08:03 AM PDT I was trying to use a tool a tool written in java called "fastqc" (for people who are interested in what is fastqc. when I tried typing the command :" fastqc" I got the error: when someone had similar previously,some one suggested that in similar case, I need to set the class path to the directory which contains FastQC installation: and depending on having a standard class path or non-standard classpath on my machine, I need to append existing classpath like: or Since my directory which contains the FastQC is /u32/myusername/Tool/FastQC so I tried both: and but none of them seemed to work. Did I mess something up? I am not sure about what |
Convert non-RAID disk with data into RAID 1 disk (hardware controller) Posted: 14 Jun 2021 09:00 AM PDT I moved away from software RAID due to all the hassle it brings. After an OS reinstall, I am left with only one drive. I ordered a hardware RAID controller today, and when the controller arrives, I'd like to plug in the identical drives into the RAID controller and set up RAID 1 WITHOUT losing any data or needing to reinstall the OS (Debian Jessie x86_64). Output of Can I do this somehow by
Will I contacted the RAID controller manufacturer and asked if it has some kind of utility to convert a drive into 2 drives in RAID1, but they said no. If it's relevant in any way, the specific controller is a HighPoint RocketRAID 620 PCI-Express 2.0 x1 SATA III RAID card. |
reinit NFS client without restart Posted: 14 Jun 2021 09:13 AM PDT I have been working on my server, from which I export one directory using NFS. Of course over the week or so of server reboots, I multiple times forgot to But this no longer works. I cannot mount the exported directory from the server on a different directory (mount hangs), but I can nfs mount that exported dir on a virtual machine running on my workstation. What I tried is removing ( I have restarted the server in the mean time, after not being able to mount without that making any difference. I also used Is there a way to recover from this and reinitialise the nfs client side on my workstation without a reboot?
in the lines preceding that, there is no The entry in |
OpenLdap - restore backup - slapcat/slapadd Posted: 14 Jun 2021 10:02 AM PDT Im using slapcat to make backup like this: Then import using slapadd: I can't restore my backup this way because of the operational attributes. I have errors for example: It's possible to make a backup without operational attributes or import somehow with them? |
Is there a way to check for a working polkit agent without checking for running process? Posted: 14 Jun 2021 07:09 AM PDT I need to check if I have an usable polkit agent in a desktop-environment agnostic way. Right now, what I'm doing is to check if a polkit agent is running, using a code like this: where
The "no-fallback" gnome3 (gnome-shell) has its own polkit agent within the gnome-shell process itself, so I can't ps-grep it. What I assume is that if The problem comes when a system has Is there any better way that I can check for an usable polkit agent? |
force rsync to overwrite files at destination even if they're newer Posted: 14 Jun 2021 09:00 AM PDT I have an rsync backup script I run, which also restores files back where they came from when I ask. But if the files at the destination are newer than those in the backup when I try to restore, it will not replace them. I really want to replace the newer files with those in the backup but I don't see a way to make rsync do this. tldr: is there a way to force rsync to overwrite files at the destination? edit: I've been running |
Posted: 14 Jun 2021 07:17 AM PDT Is there a command to show the directory/file name when cat files? For example: assume two files f1.txt and f2.txt are under ./tmp Then when I do cat ./tmp/*.txt, only the content of files will be shown. But how to firstly show the file name, then the content?, e.g.: Is there a command to do it? (There seems to be no option for 'cat' to show the file names) |
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