Recent Questions - Unix & Linux Stack Exchange |
- Rolling up Multiple Rows into a Single Row
- What things are not saved in a btrfs snapshot?
- How to get lines which are unique for 1 column but are same for another column?
- Given a weekday name, week of a month, and a year, how to find the date
- CentOS 7: yum can't find valid baseurl
- kernel headers 5.19-rc2 and nvidia drivers
- Kali linux raspi-firmware: missing /boot/firmware
- AWK command for summary statistics of array with several columns and a grouping variable
- Does the operating system affect the firmware
- Plymouth sticks around on multi-user.target boot
- Include spaces and tabs in "awk" search and replace
- How to run an arbitrary command from a Kwin script?
- Where is the "List files only" Nautilus' permission on terminal?
- Increase the disk size on Debian 11 with btrfs filesystem
- Different $RANDOM results in sed when reading lines in multiple files
- Script to find all empty git repositories on a machine
- How to get the "process IDs" which are logging output to stdout?
- Sendmail with CSV file & plain body text
- How is shell ctrl-C ctrl-Z sent over ssh?
- MQTT Error: Connection Lost
- How to set the future permissions of content in folder
- tmux select window with Alt<number>
- What is happening after kill -CONT <PID>?
- Host a server with NGINX using VPN behind a NAT
- Window not resizing on gnome shell
- Kali Live not booting, stuck on blinking cursor
- What exactly `systemctl --user enable SERVICE` means?
- How are the processes in UNIX numbered?
Rolling up Multiple Rows into a Single Row Posted: 25 Jun 2022 11:35 PM PDT How can I rollup multiple rows from a csv file into 1 row ? I have tried working out the query in SQL and it works but I am not sure how can I achieve the same in Linux. This is how my current file looks : swainb02,Ben Swain,1015 swainb02,Ben Swain,1016 swainb02,Ben Swain,1018 swainb02,Ben Swain,1020 shaiks21,Sarah Shaikh,0073 shaiks21,Sarah Shaikh,0080 shaiks21,Sarah Shaikh,0082 There are multiple users with access to multiple area codes. What I am looking for is a simpler version of this file for better readability. Desired Output : swainb02,Ben Swain,1015,1016,1018,1020 shaiks21,Sarah Shaikh,0073,0080,0082 Any idea how can this be worked out ? Thanks |
What things are not saved in a btrfs snapshot? Posted: 25 Jun 2022 11:01 PM PDT I'm using BTRFS for my root partition and manage its snapshots with Snapper. I decided to create subvolumes for However, I noticed that files inside I noticed that |
How to get lines which are unique for 1 column but are same for another column? Posted: 25 Jun 2022 11:58 PM PDT I am looking for an awk solution which would fetch lines which are unique based on 2nd column when the 1st & 3rd and 4th columns are the same. constraints :
input file :- output :- tried below code but it gives me same $2 values |
Given a weekday name, week of a month, and a year, how to find the date Posted: 25 Jun 2022 11:58 PM PDT I can find the last Monday using e.g. given: given: |
CentOS 7: yum can't find valid baseurl Posted: 25 Jun 2022 10:19 PM PDT In trying to install the latest version of
After this, my I've tried the various solutions available to tackle this problem, but nothing works. I feel like I probably messed something up when I cleaned metadata, but I have no idea how to fix this. (I am unfamiliar with the inner workings of Linux OS) |
kernel headers 5.19-rc2 and nvidia drivers Posted: 25 Jun 2022 10:13 PM PDT my problem: surly built 5.19-rc2 on a debian machine, works fine with nouveau driver but with |
Kali linux raspi-firmware: missing /boot/firmware Posted: 25 Jun 2022 10:10 PM PDT Today I upgrade my Kali Linux and at the end of it, I get an error from Output of Output of Proceeding with the upgrade will give the following message I don't have anything to do with raspberry pi, and I found the following page about it. It looks like |
AWK command for summary statistics of array with several columns and a grouping variable Posted: 25 Jun 2022 08:34 PM PDT I got a data file with time-series data. Each line of the 5+ GB csv file freqs.csv has the appearance: start_freq stop_freq measurement1 measurement2 ... measurementk Frequencies are represented on several lines out of order relative to start_freq. There is a huge number of observations. I need a one-pass-through calculation of min, max, mean, median, and count using build-in functions in awk or algorithms like those given by D. Knuth in The Art of Programming. Summary statistics for each column measurement1 measurement2 ... measurementk grouped by start_freq and summary statistics in which we see all columns as repeated measurements of the same variable grouped by start_freq. I end up with summary statistics for between 10k and 100k variables. The solution should not require a call to sort prior to the call to gawk. This again makes me think, that I should produce a C program instead of compiling a gawk call since I can then order the calculations in a vast array (100k rows times 6) before writing to disk, which of course requires a computer with plenty of RAM or a proper allocation scheme. Any opinions? I prefer a gawk based solution. Thanks in advance. |
Does the operating system affect the firmware Posted: 26 Jun 2022 12:18 AM PDT I don't know if this is the right place to ask this question but still please help me My operating system (Debian) says that I have missing firmware something about i918). Debian documentation says that I can download it with the isenkram-cli package. But isn't the manufacturer of the computer the one who gives out firmware updates? Doesn't the operating system not affect the firmware? |
Plymouth sticks around on multi-user.target boot Posted: 25 Jun 2022 06:24 PM PDT I boot my (Ubuntu) system as multi-user.target and log in with the text console. However at the point the boot is finished the plymouth splash screen stays until I press Ctrl-Alt-F2 then Ctrl-Alt-F1 at which point I can see the login prompt. There is no graphical indication that the boot is finished. How can I get plymouth to quit and show me the console login automatically? |
Include spaces and tabs in "awk" search and replace Posted: 25 Jun 2022 05:43 PM PDT Another user helped me earlier to fix something I'm doing with awk, where I search for a string at any point in all files and replace two numbers in the same line when I find it. This worked in the test files that I made (much fewer tags to read), but then in the actual files I'm trying to change for a Crusader Kings mod it's getting blocked because each line in the config file starts with a space then two tabs. I tried removing the "^" before gene_height and that kind of works, but it removes the space and two tabs from the file which might mess up the format and break the mod. Does anyone know how I can get the above script to read files that start with a space, two tabs, THEN the string "gene_height", and keep the space and two tabs when doing the replacement? |
How to run an arbitrary command from a Kwin script? Posted: 25 Jun 2022 05:32 PM PDT I want to run some commands when the active window changes in KDE. How can I do this from within a kwin script? My use case is that I want to change monitor color preset for some applications, and another use case is to toggle input remap depending on active application. There is a similar question: How can I run a kwin script from the command line? But this question is not related. Previously, I could use Window Actions for X11 to partly solve the problem, but that UI was removed (see Bug 455444) as it does not work in Wayland. I have heard that kwin scripts could not explicitly run an arbitrary commands, and the only way to interect with outside world is running dbus commands. But I am not completely sire about this statement. And if that is true, which is the dbus command, that runs an arbitrary shell command? I tried searching, and found only few info. Question on reddit that says that maybe dbus call to krunner can help. I think this probably is a key to solve the task. And this another question, but it has nothing useful in answers. Any help and code example would be appreciated. |
Where is the "List files only" Nautilus' permission on terminal? Posted: 25 Jun 2022 05:18 PM PDT I found out that some folders may have the "List files only" permission on Nautilus. Others have "Access files". Both folders show the same on terminal, using I know what the So, where in the terminal can I see (or set) this different permission? Or the "List files only" are stored somewhere else? In this case, where? I'm using Debian 11.3, Gnome 3.38.5 and Nautilus (Files) 3.38.2. |
Increase the disk size on Debian 11 with btrfs filesystem Posted: 25 Jun 2022 06:07 PM PDT I have a Debian 11 system on VirtualBox VM, and I am now trying to increase its disk size. I create this Debian 11 with btrfs file system for my main division at the beginning, so right now, it should already run on btrfs system with my existed volume. What I already done: use fdisk to create a new section from the volume I added in my vdi file use order and to make it a btrfs file system. so right now: fdisk -l shows: btrfs filesystem show : df : What should I do next? I tried the |
Different $RANDOM results in sed when reading lines in multiple files Posted: 25 Jun 2022 08:50 PM PDT I'm trying to run a command that will read multiple files in a directory, look at each line of each file, and whenever it reads a specific string ("gene_height") on any line it replaces 2 numbers on that line with 170-220. For example in the following: It should see "gene_height" and replace 192 and 161 with random numbers from 170 to 220, but it should leave the 60 and 132 from the earlier line alone because it does not start with "gene_height". What I currently have almost works, the problem is it uses the same number for everything because it's really only running $RANDOM once per file and I can't find a good way to split it to work per-line instead. Currently I am using: Any help is appreciated! |
Script to find all empty git repositories on a machine Posted: 26 Jun 2022 12:21 AM PDT We know an empty git repository only has the I want to find all git repositories on a machine, which are empty. I thought about this process:
And here's my script for this: But this does not work as I expected it. It lists all of the repos which means I have a bug in my comparison part, that I can't find. What do I do wrong? Also, I think it might not be the best approach. Any ideas on how to make it better? |
How to get the "process IDs" which are logging output to stdout? Posted: 25 Jun 2022 06:32 PM PDT How do I get the PIDs of all the processes which are dumping output to stdout. |
Sendmail with CSV file & plain body text Posted: 25 Jun 2022 09:04 PM PDT I am trying to send an email with Script Execution: Code - 1 : Code - 2 : |
How is shell ctrl-C ctrl-Z sent over ssh? Posted: 25 Jun 2022 08:06 PM PDT I am trying to figure out exactly what is sent to an SSH host when I press CTRL-C in either putty or open ssh. All I am trying to do is send control codes pragmatically that are equivalent to when a user presses CTRL-Z for example. So far every time I send ^C or \cc or \003 it just prints it out. There must be some sort of additional information to let the terminal know it was ^C escaped? Any help is appreciated. Thank you Edit: I am pragmatically sending characters to an SSH session that is already connected to an SSH host. I want to see the same effect as when I have openssh client open and I press CTRL-C on my keyboard. |
Posted: 25 Jun 2022 09:25 PM PDT A 'listener' console was setup:
What steps, from the command line, can be taken to diagnose if there is a syntax problem? Update: Replacing the MQTT server with Listener console setup: Send payload:
Publish a payload: Changing the MQTT broker demonstrates there is not a syntax error, however, the question remains why there is an error returned in the original testing |
How to set the future permissions of content in folder Posted: 25 Jun 2022 07:09 PM PDT Let's say I am the user Alice and I have a publicly accessible folder The permissions of the public Samba folder ( When Alice tries to copy over something from her home folder to the shared public drive (e.g Alice wants the newly copied files to be editable/deletable by all guests who have access to the public Samba share. I want the copied files to be owned by nobody:nogroup and set to 0777. Instead, what happens is that the newly copied files are owned by alice:alice and guest users on the public drive can't edit or delete the files. How can I ensure that future copy/move operations of content from Alice's home folder to the shared/public Samba folder will be owned by nobody:nogroup so that guest users aren't then prevented from deleting/editing the files themselves? |
tmux select window with Alt<number> Posted: 25 Jun 2022 10:03 PM PDT In tmux to select a window, the default behavior is I did it for the next and previous window, and it works: For the selection by id, I did the same, but it does not work: Is there an easy way to make it working? |
What is happening after kill -CONT <PID>? Posted: 26 Jun 2022 12:03 AM PDT I have suspend a process through I started the process (a shell script) from one bash (say bash-1) with |
Host a server with NGINX using VPN behind a NAT Posted: 25 Jun 2022 05:23 PM PDT so I was hosting a server using NGINX on a Raspberry Pi using a T-Mobile mobile router. All was working fine, till I noticed today that T-Mobile started to put me behind a NAT sometimes. So I heard you can still access the server if you set up a VPN network, but I have no idea on how to do it. I searched on the internet but didn't find any tutorials on how to do it using a mobile network, so I thought to ask here. Sorry if this question has been answered before. I heard you can still accesd the server using VPN or SSH-Tunnelling here: https://superuser.com/questions/277218/ssh-access-to-office-host-behind-nat-router |
Window not resizing on gnome shell Posted: 25 Jun 2022 06:02 PM PDT I am using archlinux with gnome shell 3.14.3-2 and I am unable to resize windows using eather Pressing Has anyone even experienced the same issue ? Is there a known fix ? |
Kali Live not booting, stuck on blinking cursor Posted: 25 Jun 2022 11:00 PM PDT I have a laptop which i have previously successfully installed Kali on to, i ended up installing debian over it later on for other purposes. I have recently revived my interest in security and was intending to install Kali onto a partition on the free space on my hard drive. I created a bootable usb with unetbootin of the kali 1.0.9a image. When i try and boot off the usb all that happens is it opening to a blank screen with a blinking cursor. I have read this could be related to graphics incompatibility but have not found any solutions. The laptop has on board Geforce GT 640m. IF anyone knows what could be the problem any advice is appreciated :) Cheers. |
What exactly `systemctl --user enable SERVICE` means? Posted: 25 Jun 2022 05:56 PM PDT I expected |
How are the processes in UNIX numbered? Posted: 25 Jun 2022 07:12 PM PDT I can't find any pattern when I look at the numbering of PIDs in process table ( I'm using Mac OS X but I guess that the answer should apply to UNIX in general. |
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