Recent Questions - Unix & Linux Stack Exchange |
- Include csv headers in sed
- xfce, xfwm and .Desktop shortcut
- executing local script on remote server with local input
- Using ntfs-3g, how to parse Windows extended attributes?
- Linux (Mint) eats all my RAM
- How to display the paths to all files that have a size greater than the specified limit
- How to escape folder name for touch command?
- How to get overlay filesystem working on Debian
- Matching lines in file, with 2 lists of strings in order
- Kitty Terminal Automatically deselects text?
- Logging input and output on terminal with script command, can I do this more elegantly?
- Ubuntu WSL disappeard from my Windows terminal?
- How to increment a persistant, inter-process counter in bash/shell
- FreeBSD - get timezone in Continent/Region format
- Running a script on every tty
- Why there is a sound from speakers and earphones simultaneously at a time?
- Sed to replace text that comes after match
- New installed Kali linux is not connecting to internet
- What is the equivalent of "freebsd-update" on OpenBSD?
- How to use an Android device as additional display on Linux
- unable to chmod inside shared folder of virtualbox
- Delete line if next line is the same
- What is the difference between tiling and snapping windows on Linux Mint cinnamon
- wpa_supplicant not connecting, because SSL3 is unsupported
- Why is the ssh utility considered a pty?
- Unable to run pvcreate command
- Shell Script: Want to delete two consecutive lines matching pattern from specific line
- How much RAM should an SSH connection typically use?
- How to unfreeze after accidentally pressing Ctrl-S in a terminal?
Posted: 26 Apr 2022 05:23 AM PDT I am building a document script.sed that executes different sed expressions like this: I run the sed script through: The output does not include the csv headers. I have tried with different expressions without success. Is there a way to print them in a sed expression without making any modification? Thank you |
xfce, xfwm and .Desktop shortcut Posted: 26 Apr 2022 05:12 AM PDT I started using a Debian distro and I'm new with it. I'm trying to customize shortcut and I don't get the differences between xfce and xfwm. Why there are "two type of shortcut"? (located in the relative menu). In addition, which is the difference between them and .Desktop shortcut (the one generated by writing a .Desktop file). Thanks Cheers |
executing local script on remote server with local input Posted: 26 Apr 2022 04:55 AM PDT I have a I tried the script: It execute the script but the arg1(which is input data) python script doesn't take from local machine but when the input data present in remote server it works. I hope experts may show some way to overcoming this problem. |
Using ntfs-3g, how to parse Windows extended attributes? Posted: 26 Apr 2022 04:46 AM PDT Using xattrs, one can access Windows extended attributes using the following command The problem is instead of an attribute list, it returns a raw single binary value encoded as base64 or hex containing everything. So for example (since I know the attitude name I m needing), how to get the value of |
Posted: 26 Apr 2022 04:44 AM PDT I know, there are plenty of "Linux eat my RAM" threads all over the internet, but they can't help me to solve my problem. (I had a try with this question on askubuntu but I'm off-chart with Mint) At home my workstation is a Mint19/Ubuntu18.04/Cinnamon box, used for Java/BigData development. Some time, not every day, after some hours of work, my Intellij IDE becomes laggy, due to missing RAM. If I look the "top", I see that only some Mo of the 16G RAM are available and that system is swapping. I can't understand where the +10G RAM are used for. Some time ago, this happened. To have a better understanding, I CTRL-F1 to a non graphical sessions, then I stopped the LightDM X-Server. So all the RAM eating graphical apps (skype, slack, chrome etc...) are off. And only the system daemons are alive. After this purge "free" gives me : So, the XServer stop made me recover ~4G, but 11G are always missing /proc/meminfo looks like : Missing RAM is not in SLAB (there are some threads about that) I tried several things :
But nothing helped Any idea ? |
How to display the paths to all files that have a size greater than the specified limit Posted: 26 Apr 2022 05:05 AM PDT I need to output the paths to all files that have a size greater than the specified limit (declared as a variable). I've done it using find script: And it give me 2 errors: How to solve that? |
How to escape folder name for touch command? Posted: 26 Apr 2022 05:01 AM PDT I've created two scripts. The first reads the mtime timestamps of all folders and writes it line by line to time_old.txt: The second reads those lines back and runs This works for folders like Where's my mistake? |
How to get overlay filesystem working on Debian Posted: 26 Apr 2022 05:29 AM PDT I asked this question and got a great reply on how to install I followed the answer and now have I then changed Restarted, but if I perform: I found out maybe the following is required (tried it, even though on Ubuntu one didnt have, but maybe for Debian its required): Append Rebooted the computer, but overlay FS is still not enabled. Does Ubuntu perform some other magic behind the scenes? What else could I try? Update: I resinstalled the OS on my PC to Ubuntu, and looked at It seems that |
Matching lines in file, with 2 lists of strings in order Posted: 26 Apr 2022 04:44 AM PDT I am trying to match access-list lines in a file where certain environments (list A) are destination, and other environments (list B) are the source. And vice versa. This is on an Ubuntu server. Problem is that these lists are both around ~15 lines, which makes for quite a bit of combinations, and a very long grep command. And the file being searched in is around ~3000 lines total. I know i can match lines in a file with lines in a file via grep -f, but i haven't been able to find a solution to my specific search requirements, where i am searching from 2 lists, and the order matters. Example of what i would want to do (the parentheses are intentional, since i am searching in a file that has relevant environment appended to IP addresses per line): I am open to any commands usable on ubuntu or even a python script. Right now my grep search look something like this (for matching lines where List B is destination, and List A is source) Any help is appreciated, so i hopefully can reduce my current script from the 15000 characters :) |
Kitty Terminal Automatically deselects text? Posted: 26 Apr 2022 03:42 AM PDT Every time I highlight text to copy from the terminal it automatically deselects it. Creating a situation where I cannot copy from the terminal. What might be causing this behaviour? |
Logging input and output on terminal with script command, can I do this more elegantly? Posted: 26 Apr 2022 03:20 AM PDT Goal: to create a log of an entire terminal session, commands used and their output, including time and date. I have attempted to achieve this with the script command, which is commonly used in conjunction with scriptreplay. I have also looked into ttyrec and asciinema, but have yet to find a satisfying solution. Script doesn't seem to have a parameter for adding time and date in front of the commands, but rather has an option to create a secondary timestamp file for use with scriptreplay. Not what I want. This allows me to create the time and date for each entry. A bit hacky. Simpler is better. What are my other options? |
Ubuntu WSL disappeard from my Windows terminal? Posted: 26 Apr 2022 03:44 AM PDT Hi I am using WSL Ubuntu 20.04. on my Windows Terminal and I wanted to change my font color. But when I copy code to my .json file When I click on settings it gave me warning : and also when I launch my Windows terminal it says Do you know how can I make my WSL work again but with a new font color? I wanted to make it look more like this https://github.com/xcad2k/dotfiles/blob/main/Windows/WindowsTerminal/settings.json but with a background of my pc. Thank you for your answers and advices. |
How to increment a persistant, inter-process counter in bash/shell Posted: 26 Apr 2022 03:08 AM PDT Here is a minimal example of what I am trying to do: Except, multiple instances of this script could be running at the same time, and do_something_long should be invoked with an unique identifier (preferably human-readable, so starting from 0 or 1). I tried to use flock(1) for acquiring a lock, but most safe examples use a subshell to bind to a file descriptor, which prevent me to access the unique identifier in the parent shell. And I don't want do_something_long in the subshell, as it would hog the lock for too long. |
FreeBSD - get timezone in Continent/Region format Posted: 26 Apr 2022 05:11 AM PDT I have a Linux (bash) script to generate a login message (motd). One of the things it displays is the timezone, using the command Naturally, since there is no The closest I have managed is using Is there a way to display the system's timezone in Thanks! |
Posted: 26 Apr 2022 03:11 AM PDT I have a shell script that i want to run on every tty i tried adding it to my .bashrc but it only works after you login and it executes even if the terminal isnt a tty |
Why there is a sound from speakers and earphones simultaneously at a time? Posted: 26 Apr 2022 03:47 AM PDT I have a earphone(fine) and a new laptop This is my alsamixer screenshot. |
Sed to replace text that comes after match Posted: 26 Apr 2022 05:44 AM PDT I was working it with I'm thinking that I want to specify a variable ( I want to print: -only lines containing the match. Ignore lines that do not have the match. -print up to and including the 1st match value on the line -if there is any value after the match, replace it with 'masked' -if there is nothing after the match, print line as is (or replace with 'empty') -case insensitive search for the match. infile.txt Desired Output |
New installed Kali linux is not connecting to internet Posted: 26 Apr 2022 03:00 AM PDT When I was installing Kali linux on my pc, I realized DHCP can't be configured so I skipped that part. After installation I used ifconfig and saw wlan0 was there but after opening a website I get this error that in which I have no internet connection.I had this problem with different kernel versions. any ideas with this problem? |
What is the equivalent of "freebsd-update" on OpenBSD? Posted: 26 Apr 2022 04:00 AM PDT I have been using FreeBSD for quite some time. Now I want to dive into OpenBSD some more. Currently I'm trying to figure out what is the "recommended" way to keep my system up-to-date. On FreeBSD, we use the command Now: What is the equivalent procedure on OpenBSD? I think that But how to get security patches for the "base" system of the OpenBSD release that I'm currently running? Does such thing even exist for OpenBSD, or do I have to wait for new release? 😲 Thank you! |
How to use an Android device as additional display on Linux Posted: 26 Apr 2022 04:35 AM PDT Can anyone please tell how to use an Android device as a second monitor to extend the display? I found an app called "spacedesk", but it is only available for windows. Can anyone suggest a method to do so or install the app? |
unable to chmod inside shared folder of virtualbox Posted: 26 Apr 2022 04:03 AM PDT I have shared a folder from Windows on to my virtual machine. The shared folder is being mounted correctly, and I am able to read write within the folder, but unable to change permissions of any file within the shared folder. Below are the mount options of the shared folder user is already part of vboxsf group Below error is thrown when try to change permissions using chmod for any files inside shared folder. |
Delete line if next line is the same Posted: 26 Apr 2022 04:48 AM PDT What sed/awk command can I use? Just Input: Expected output: |
What is the difference between tiling and snapping windows on Linux Mint cinnamon Posted: 26 Apr 2022 05:13 AM PDT I am using Linux Mint 19.1. When I enter window tiling settings it is described as...
In addition is has the settings....
As well, when I hover the window near the edge is says...
But I can not for the life of me figure out what is different between these two concepts. Holding ctrl to enter snap mode just turns the tiling boxes green. Then only behaviour I see is windows being tiled to full, half and quarter sizes. |
wpa_supplicant not connecting, because SSL3 is unsupported Posted: 26 Apr 2022 02:52 AM PDT I've a laptop running Debian GNU/Linux Unstable with Network Manager. Since an update of OpenSSL (1.1.1 I think), I can't connect to a Wi-Fi network using WPA2 Enterprise with PEAP (MSCHAPv2). In Downgrading OpenSSL fixes it of course, but then I can't use things that are compiled to newer versions of OpenSSL. Is there any way to connect to the Wi-Fi network? |
Why is the ssh utility considered a pty? Posted: 26 Apr 2022 02:53 AM PDT I've read here that In |
Unable to run pvcreate command Posted: 26 Apr 2022 03:03 AM PDT Is it possible to run I got the error : Here are the device properties |
Shell Script: Want to delete two consecutive lines matching pattern from specific line Posted: 26 Apr 2022 05:03 AM PDT I want to delete specific two consecutive lines matching patterns from specific line from a file. For e.g. file contents are like below. I want to find the lines starting from line 4, matching 1st line pattern starting with "Name: " and matching 2nd line pattern starting with whitespace and delete the two consecutive lines. Any efficient way to do this in shell using To be a bit more clear, I want to remove signing/checksum information from the MANIFEST.MF. Sample MANIFEST.MF like below: From the below manifest file, I want to remove the entry "Name: ". where "Name: " entry can be in one line or 2(or more) lines. Initially my solution was like find the first "Name: " entry followed by "SHA-256-Digest: " entry and delete to the end of the file. Unfortunately this solution has a problem of removing one needed entry in the middle. For e.g. "NetBeans-Simply-Convertible: " is also being removed. So, now I want to remove "Name: " entry if available in 1 line or entry spanned across 2 or more lines. But I should not lose entries like "NetBeans-Simply-Convertible: " while removing "Name: " entries. Already I am removing "SHA-256-Digest: " entries with the below command on file with Manifest-Version: 1.0 Name: com/abc/xyz/pqr/client/relationship/message/notifier/Relati Name: com/abc/xyz/pqr/client/relationship/ui/BaseRelationshipView Name: com/abc/xyz/pqr/client/impl/MofRelationshipAgentImpl.class Name: com/abc/xyz/pqr/client/settings/ConvertibleProperties.class Expected Output:Manifest-Version: 1.0
... |
How much RAM should an SSH connection typically use? Posted: 26 Apr 2022 02:58 AM PDT I'd like to ask about how much memory an SSH connection should take typically. Here is how I'm finding out how much of a RAM hit is incurred: Kindly don't get vehement that I'm using a GoDaddy shared hosting plan or cPanel. When nothing is running, cPanel reports 0 MB of RAM in use. When I SSH into my (1GB, 2 CPU) shared hosting, cPanel suddenly reports around 490 MB of RAM in use. (Also, I literally obliterated all PHP files in the public folder to eliminate the chance this is due to robot crawling. I read https://serverfault.com/questions/449296/why-is-linux-reporting-free-memory-strangely, but it doesn't help.) No connections: After SSH'ing into my account:
My question is, how much RAM should an SSH connection take? Is around 500 MB typical? GoDaddy support says, "That's the way it is. Get VPS." Is that really right?? |
How to unfreeze after accidentally pressing Ctrl-S in a terminal? Posted: 26 Apr 2022 03:25 AM PDT It's a situation that has happened quite often to me: after I press (with a different intention) Ctrl-S in a terminal, the interaction (input or output) with it is frozen. It's probably a kind of "scroll lock" or whatever. How do I unfreeze the terminal after this? (This time, I have been working with |
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