Recent Questions - Unix & Linux Stack Exchange |
- What is the under the hood difference in how linux implements commands which can be piped vs those that accept command arguments?
- pipe for read command does not work
- Why menu options/items for editors/commands are declared with uppercase characters?
- How to make Mozilla Firefox to follow the Freedesktop XDG specification?
- less command: b/f vs w/s
- chroot as unpriviledged user leads to 'Permission denied' trying to run any binary
- less command g vs p option
- wmctrl Cannot get client list properties. (_NET_CLIENT_LIST or _WIN_CLIENT_LIST) [Solved]
- Rewriting log parsing script in Perl or Python (get rid of awk)
- how to check if a ssh key is already unlocked
- Maintain parallel lossy and lossless music collections
- systemd Firewall .service Unit: Type=exec or Type=oneshot?
- OpenVPN and logs
- Linux Debian Bullseye - not able to install packages after uninstalling libreoffice
- Is it possible to trace/record every file IO being done by one or all applications, both through syscalls and mmap?
- Make 2nd column unique and add the respective value of them in 1st columns
- Custom mime type for directories
- How to run remote server shell script with environment parameters on Jenkins pipeline
- Why do my Thinkserver TS140 with Ubuntu Server 20.04 freeze?
- What is the armored option for in GnuPG?
- Docker reporting that my Linux kernel doesn't support cgroup cpu real-time period
- Alsa and PulseAudio (csound): Connection Refused
- Bash list all display output ports
- Download Ubuntu Live CD
- Why is looping over find's output bad practice?
- GRUB: Display GRUB on external display connected to laptop?
- proxify a custom program to proxychains
- AIX memory consumption
- How can I know the max possible transmit power of my wireless card?
- Network connection drops after a few seconds
Posted: 11 Jun 2022 07:23 PM PDT I understand the basics of OS memory management, processes, communication between processes, etc. However, it is not obvious to me the fundamental difference between the implementation of commands that can receive input via pipes and those that can only accept command arguments. As a trivial example, why can I pipe the filenames output by |
pipe for read command does not work Posted: 11 Jun 2022 06:41 PM PDT read command in sh works if I redirect However, if I redirect standard output from echo like It does not work. I thought read gets standard input from pipe in the second case. Why am I wrong? Thank you. |
Why menu options/items for editors/commands are declared with uppercase characters? Posted: 11 Jun 2022 05:45 PM PDT When etc .. Each one represents
respectively Reason of this post: when a new linux user - nobody has born with knowledge - see these menu options/items using uppercase characters he could assume the following:
Therefore, why not from the beginning show This scenario applies for example for the Observe |
How to make Mozilla Firefox to follow the Freedesktop XDG specification? Posted: 11 Jun 2022 07:20 PM PDT I want to use the XDG specification to avoid cluttering in my $HOME directory in Arch Linux. Right now, Firefox version 101 created a $HOME/.mozilla directory, which I want to place somewhere else. So, how can I configure Firefox to use a different directory? |
Posted: 11 Jun 2022 06:46 PM PDT About the indicates the following: Enabling the line numbers - with Question
normally I use the first pair, but when use the second pair? Extra Question
I am assuming it is the expected difference that makes |
chroot as unpriviledged user leads to 'Permission denied' trying to run any binary Posted: 11 Jun 2022 05:05 PM PDT I have a chroot root containing some static binaries on an ARMv7l platform (Kobo eReader, see InkBox OS project), namely BusyBox. chrooting as root works fine: then I tried to login as an unpriviledged user in the chroot via the Stack trace:
Permissions: It also gives me the same 'Permission denied' error if I try to do Any idea of what's wrong? Thanks! |
Posted: 11 Jun 2022 04:08 PM PDT In indicates: I tested both, and of course the result is the same (of course using But just at a first glance if |
wmctrl Cannot get client list properties. (_NET_CLIENT_LIST or _WIN_CLIENT_LIST) [Solved] Posted: 11 Jun 2022 05:30 PM PDT Fresh Arch install running ctwm. If I do a simple wmctrl -l I get Cannot get client list properties. (_NET_CLIENT_LIST or _WIN_CLIENT_LIST) I've done plenty of minimal arch installs all basically the same and I've never had this issue and the output is pretty vague to trouble shoot what is missing/wrong. |
Rewriting log parsing script in Perl or Python (get rid of awk) Posted: 11 Jun 2022 06:30 PM PDT I need accomplish a task of filtering bot's activity in the log file. Solution should only show records (strings) meeting following criteria
All 3 actions are performed in 1 second of time. Input data example I've written the code below in order to complete the task Usage: ./parse_log.sh logfile.log Output: But I want to know what alternative written in Perl or Python (with minimum usage of external libs) would look? |
how to check if a ssh key is already unlocked Posted: 11 Jun 2022 02:29 PM PDT I'm working on automation scripts and have ran into a bottleneck with The reason for this check is to prevent the automation script from triggering the passphrase dialog every time. My question is: why PS: key is already loaded as mentioned and the file path to that key is known. |
Maintain parallel lossy and lossless music collections Posted: 11 Jun 2022 04:12 PM PDT I have a large music collection. Some of it is lossless files, and some is lossy. I would like to maintain a copy of the collection that consists of the original collection's lossy files, and lossy transcodes of the original collections lossless files. Some assumptions:
I want to:
I imagine I will need to use some custom scripting to accomplish this, but if anyone has recommendations or tips before I sink lots of time into this, I would be eternally grateful. |
systemd Firewall .service Unit: Type=exec or Type=oneshot? Posted: 11 Jun 2022 03:12 PM PDT I'm debugging a firewall .service unit and a few questions arise. One of those questions is the unit's best service type, either exec or oneshot. Virtually no comparisons of the two appear in my searches, probably because exec is a relatively recent addition to systemd (v.249 IIRC). By way of background, the unit (call it iptables.service) is intended to activate and configure the firewall by running a Bash script (call it iptables.sh) before the network is up (i.e., before network-pre.target), e.g., Type=oneshot has the advantage of not entering the "active" state, so it subsequently can be restarted or reactivated, e.g., by a timer unit. It also is the more common of the two types in most examples, albeit without explanation. Type=exec has the advantage that it will delay startup of follow-up units until the main service has been executed. This seems to make perfect sense for a firewall .service unit because the network should depend on the script running successfully and remain down otherwise, e.g., if the script temporarily can't be read because somehow the relevant .mount unit hasn't yet activated. Restart=on-failure seems to be an obvious and prudent addition in either case. The first question is whether one or the other might better for any reason. The second question is whether Type=exec, because it delays the start of follow-up units, might introduce a subtle ordering cycle in some edge cases, either with or without "Restart=on-failure", in part because the unit's ordering dependency is relatively early in the boot process. |
Posted: 11 Jun 2022 06:34 PM PDT I have installed OpenVPN on a linux server and was wondering how I can see http/traffic logs from a user. I would like to see something like: User A accessed google.com at 2022-02-02:10:10:10 - And if there is a way to see packets? Is is possible to see these logs with OpenVPN? I tried looking for logs under, but no luck: /var/log/syslog /var/log/openvpn.log /var/log/messages Thanks |
Linux Debian Bullseye - not able to install packages after uninstalling libreoffice Posted: 11 Jun 2022 01:00 PM PDT I uninstalled libreoffice and its packages to replace it with another office software. After this step I cannot use I also cannot install libreoffice because it has broken packages: Thank you very much in advance. |
Posted: 11 Jun 2022 07:08 PM PDT I want to trace every IO operation an application does in its lifetime and don't want any caching effect to interfere. I cannot change the application source code, using a shim would be OK. Performance is not an issue, I just want to record what an application does even if it takes hours. The final goal of this is to use the traces to try to improve heuristics related to filesystems, for example, prefetching. Ideally the output would be something like <filename, offset>, but just would probably be enough. Here are my ideas so far and why I think they won't work:
Edit: here are some other ideas, but I don't know how to implement yet:
Am I overthinking this? Is there either a solution that I didn't think about that does this or a fix to one of the problems I identified? Thanks! |
Make 2nd column unique and add the respective value of them in 1st columns Posted: 11 Jun 2022 01:34 PM PDT I have input as shown below, and I need to keep only unique strings from the second column, where the first column will become the sum of all values for each unique string. For ex: take the INPUT: Expected Output: |
Custom mime type for directories Posted: 11 Jun 2022 07:30 PM PDT Is it possible to make a custom mime type for directories (inode/directory)? |
How to run remote server shell script with environment parameters on Jenkins pipeline Posted: 11 Jun 2022 07:06 PM PDT I am attempting to run a shell script on a remote server in jenkins scripted pipeline using the However, it keeps saying that the parameters are null there is an error being thrown. I have tried everything and cannot find an answer. I echo the parameters before they are thrown and they contain strings which I expect. These are the errors being published at the end. |
Why do my Thinkserver TS140 with Ubuntu Server 20.04 freeze? Posted: 11 Jun 2022 05:25 PM PDT I have a Lenovo Thinkserver TS140 with SSD. I can install Ubuntu Desktop or Server 20.04 on the SSD and use it without any problems. But when I add a internal WD Red Pro 6 TB internal hard-drive (ext4) the computer freeze after it have been running for a while. Sometimes a couple of minutes. Sometimes a couple of hours or days. If I disconnect the drive the computer works so something happens when the drive is connected. I am building a Plex media server and it works perfect until the computer freeze. Can someone please tell me what to do? The screen looks like this when that happens. |
What is the armored option for in GnuPG? Posted: 11 Jun 2022 03:37 PM PDT when I export a gpg private or public key, and specify armored as a switch, I get plain text key, however, the gnupgp website seems to state that these keys are actually encrypted. What's the point in calling it armored if its just plain text? I don't get it.
|
Docker reporting that my Linux kernel doesn't support cgroup cpu real-time period Posted: 11 Jun 2022 02:01 PM PDT I've configured Docker on my Ubuntu 18.04 Server to expose its API so I can create and deploy Docker containers via REST requests, which I need to add certain features to my project. This worked fine for first few endpoints I tried. However, when I attempt to create a new Docker container (the main point of the exercise), I get the message: Is this true? Alternatively is it instead that I need to set something up to enable this functionality, or is Docker reporting incorrectly? Very grateful for any assistance given as this functionality is critical to my project. |
Alsa and PulseAudio (csound): Connection Refused Posted: 11 Jun 2022 03:04 PM PDT I've come across a problem that has me completely stumped. First; some system info Now; I'm playing with a sound generating/music library called csound and I'm seeing a strange issue. I'm using a layer over csound via Haskell; the library is called As per my understanding; csound then routes the audio to Alsa, which on my system, attempts to route it via PulseAudio's Now, something strange happens on my system.
In case 1 (above); I see something interesting in the logs but I'm limited by my understanding of how PA works, how Alsa works and how both of these work together: The user here is in the Can anyone help with what could be going on here? Also note that; in case 2; |
Bash list all display output ports Posted: 11 Jun 2022 02:31 PM PDT I am looking for a command which prints all visual output ports a laptops has. I have searched Stack and Google for a while now but I cannot find an answer. The closest I got is Looking for something like Unfortunately this output doesn't show the information I need. The information from Tried The ideal situation would be But a finger at the right direction would be greatly appreciated. |
Posted: 11 Jun 2022 06:02 PM PDT For pxe boot I need iso Ubuntu. The problem is when Clients requests iso from the Server and iso is Standard Desktop Image (around 1.5 GB), Clients just do not have enough RAM... So I need just Live CD with no option 'Install Ubuntu' Is it possible to download only Live CD Image and if it is please share the link. Thanks in advance! |
Why is looping over find's output bad practice? Posted: 11 Jun 2022 06:32 PM PDT This question is inspired by Why is using a shell loop to process text considered bad practice ? I see these constructs and being used here almost on a daily basis even if some people take the time to comment on those posts explaining why this kind of stuff should be avoided... Why is looping over |
GRUB: Display GRUB on external display connected to laptop? Posted: 11 Jun 2022 04:04 PM PDT I am using Ubuntu Gnome on a Lenovo Y50-70 with a GTX 860M. I have been unable to successfully configure I want GRUB to display on my HDMI monitor but it only displays on my laptop inbuilt eDP display. |
proxify a custom program to proxychains Posted: 11 Jun 2022 05:02 PM PDT After some research, I didn't find any solutions. So I post here. My goal: redirected the HTTPs traffic from my custom program to BurpSuite in order to analyse the server response and debug my program.
In a debugging goal, I have thought to send my flows via BurpSuite in order to see the HTTPS requests. So:
And when I use proxychains: My program is executed but proxychains doesn't "proxify" the flow and so Burp doesn't see nothing... I think that's because I am in my local network ? What do you think about the best solution to intercept and see the HTTPS flows to my php program ? |
Posted: 11 Jun 2022 01:06 PM PDT Question: how can we report the REAL memory usage (without the cache!) using nmon or vmstat or svmon on AIX 6? nmon: vmstat: svmon: Like on Linux, we can use the free command, but it's not available in AIX: |
How can I know the max possible transmit power of my wireless card? Posted: 11 Jun 2022 06:08 PM PDT Is there any way for me to tell the maximum possible power of my wireless card from within Linux? Or do I need to find the product number of the card, and search for specifications like that online? |
Network connection drops after a few seconds Posted: 11 Jun 2022 04:50 PM PDT I am on Debian. I configured my NIC with a static IP (192.168.1.56). When I try to connect to a network, initially with but after a few seconds the At my university, the connection is a DHCP one. It works for the first few seconds but after it doesn't. How do I go about fixing this? Here it is the relevant part of the syslog: (static ip configuration) |
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