Recent Questions - Unix & Linux Stack Exchange |
- systemd NOT directing standard output to a file
- how to perform a silent install of bandwidthD in ubuntu 20.04
- Stuck in windows troubleshoot screen after installing Zorin OS 16
- Custom run level
- Wifi stopped working on debian 10 buster
- Linux: How do I get device name for 3rd partition of a given block device
- RHEL 7 doing init 5 isolate graphical.target no graphical login screen, and nvidia
- Get all css style, link, js and script from html file using ShellScript
- Adding a column with random values to end of CSV
- Instructions for combining some partitions using gparted, and some other questions
- Matching a valid version number inside case statement
- Centos Resolve conflicts
- Extract text starting at specific category header to next category header from a text file
- Remove window from Alt-Tab-Menu
- scp / ssh: deleting a big file (1 TB+) WHILE it is being transferred
- null characters at the beginning of an ASCII log file
- SFTP - check and copy recent files to local then archive within sftp
- Can named pipes/FIFOs be used in a "cyclic" manner together with `tee`?
- Hostapd active, but no WIFI signal with ath9k
- Tmux sessions get killed on ssh logout
- How to make nc listen for remote connections
- How to properly set Environment variables (golang on Manjaro)
- How to replace Ubuntu with Arch on a dual boot?
- How do I create a new empty file in a bash script?
- How to extract unique values from column #x with its corresponding values of column #y?
- Remove specific word in variable
- HPC ssh "connection closed by remote host"
- what is the difference between "ssh user@ip" and "ssh ip user"?
- How can I send stdout to multiple commands?
systemd NOT directing standard output to a file Posted: 29 Jul 2021 10:23 AM PDT Our service-definition, running under The service starts without obvious errors and the actual program runs Ok too. However, nothing appears in the specified log-file and, when I list the files opened by the process ( I tried specifying absolute path to the log-file too -- it made no difference. We're on RHEL7, where systemd is of version 219-78 -- is this a known problem, perhaps? Is there a solution/workaround? |
how to perform a silent install of bandwidthD in ubuntu 20.04 Posted: 29 Jul 2021 09:50 AM PDT how to perform a silent install of bandwidthD to avoid windows and put IP and interfaces to monitor by command line (ubuntu 20.04) thanks |
Stuck in windows troubleshoot screen after installing Zorin OS 16 Posted: 29 Jul 2021 09:24 AM PDT I recently installed Zorin OS by getting the iso and then using rufus to put it in a flash drive. I then tried out the OS from the flash drive without actually installing it on my laptop. The OS worked well so I decided to install it on my laptop. It said that I have to disable RST so I changed it to AHCI. I also chose the option to remove my previous OS(Windows 10) and replace it with Zorin. After the installation, I had to restart my computer and remove the flash drive with the iso. Instead of starting Zorin, it would keep opening the windows troubleshoot screen. Actually, it opens the windows trouble screen pretty fast that I doubt it even attempted to start Zorin. I tried repeatedly pressing f12 during the startup screen and chose to boot using the "ubuntu" option. It still led me to windows troubleshoot screen. Does this mean that I still have windows 10 in my computer? And how do I make my laptop start Zorin instead? Sorry I'm still new to linux so idk what idk. Oh and I should also mention that I didn't encounter any Blue Screen of Deaths, it just opens windows troubleshoot screen right after the startup screen with the manufacturer's icon. |
Posted: 29 Jul 2021 09:10 AM PDT I recall in the past creating a custom run (init) level. Has anyone else come across that? I'm wanting to have a run level invoked in specific conditions. I've searched through current documentation. I can't remember for the life of me how we did it previously. |
Wifi stopped working on debian 10 buster Posted: 29 Jul 2021 10:17 AM PDT I was using an Atheros AR9271 usb dongle and it worked fine for years, but since a couple of days I cant connect to my network anymore. To be precise, I can select my network but it fails to connect. The same problems of the associating process taking to long also happens with a different dongle (realtek). ouput of NetworkManager (of 2nd dongle): Its hard to say if a upgrade affected the NetworkManager but this is the complete list of upgrade packages from the period of breaking: regarding the WiFi router, it is one supplied by my ISP but it is a temporary solution working on 4g (huawei) (looks similar to a phone wifi hotspot). I don't think they update these remotely. |
Linux: How do I get device name for 3rd partition of a given block device Posted: 29 Jul 2021 09:17 AM PDT How do I get (reliably) a partition device name knowing block device and partition number? For example:
My current method is the following but it is buggy as it assumes minor number is the partition number which is completely wrong except for 1st disk. minor can be computed, but it has many limitations. one is that after a maximum, dev does dynamic allocation. This is part of a script that create partitions knowing block device name and partition number. there after I need too create a filesystem, but I can't assume that partition name is the block device name followed by partition number. Sometimes there is a letter p (driver dependent). maybe udev knows that? |
RHEL 7 doing init 5 isolate graphical.target no graphical login screen, and nvidia Posted: 29 Jul 2021 08:41 AM PDT using RHEL 7.9 x86-64 on an HP server having a small nvidia GPGPU, a Tesla T4 if I remember correctly. I do know this gpgpu is not a graphics card... it has no monitor outputs to it. We currently have We installed However when doing My question is: since RHEL 7 no longer uses I don't believe this console graphics problem is related to nvidia entirely as I have somehow created this problem on other servers not having any nvidia card or driver installed and have run into this same problem. And we have everything working fine on numerous other servers having nvidia gpgpus and/or nvidia graphics card. What does one do when doing This is on a 24" 1920x1200 monitor off the blue VGA port off the server motherboard. Where if successful I can log in graphically and have terminal windows as well as mouse and copy/paste capability, but having no window and no mouse capability at the console is a show stopper and I am hoping to find a way to fix this without having to reinstall RHEL 7 from dvd. After installing RHEL 7.9 from dvd everything is initially fine, we somehow travel down some road we are not aware of where we nuke the graphical console. |
Get all css style, link, js and script from html file using ShellScript Posted: 29 Jul 2021 08:53 AM PDT I want to get all JS Here I can run different commands to get the script block, script link, and same for style and link. I have tried below where I can get the But here it will return from the start of the my command will return all of it when the HTML file is minified(in a single line). Where I need the outcome to be Similar for For this I found below command will only return the CSS link from the link tag: it returns Check out my sample HERE Edit it from HERE Any other solution will be highly appreciated. (e.g - awk, Python or any other) |
Adding a column with random values to end of CSV Posted: 29 Jul 2021 08:00 AM PDT I have a CSV with a list of users, and would like to add a column with a one-time-use randomly generated password, unique to each user. My script works... but then it just keeps going indefinitely adding rows. If I move the code to set the variable out of the loop, it works just fine, but then every user gets the same password. How do I get this to terminate on the last row? |
Instructions for combining some partitions using gparted, and some other questions Posted: 29 Jul 2021 09:58 AM PDT (first time StackExchange Linux user here), I have been using Linux Mint for quite a while now, and originally partitioned with only a little space for it (originally intended just to play around with it). Because of this, I have just used all my storage. I have another 80 or so GB to add to it using gparted, but am inexperienced with the program, and don't want to break anything. My disk allocation looks like this: As can be seen, Linux Mint is on In addition to this, windows is on Would the combination process for the old-windows partition (if I delete it), be the same as for the unallocated 74.81 GB? Update: I have taken initiative, and uninstalled Windows completely. The partition table on gparted now looks like this: |
Matching a valid version number inside case statement Posted: 29 Jul 2021 07:58 AM PDT I want to match a version number inside a and is stored inside a shell variable: As I searched on the internet, it's little tricky to match a regex inside a I tried the following, but it didn't work: |
Posted: 29 Jul 2021 08:52 AM PDT i am trying to install kubernetes and docker on Centos 8 but i have package conflicts how do i fix them? |
Extract text starting at specific category header to next category header from a text file Posted: 29 Jul 2021 07:07 AM PDT I have a TOML file in the following format (categories may have any name, the sequential numbering is just an example and not guaranteed): What I want to achieve is to retrieve the text inside a given category. So, if I specify, let's say, I tried using It wasn't working unless I removed the Is there a way to do it correctly? If not with |
Remove window from Alt-Tab-Menu Posted: 29 Jul 2021 07:51 AM PDT I'm using pop_os with Wayland and I was wondering whether there was a way to remove certain processes from the Alt-Tab menu. In my case I have a certain |
scp / ssh: deleting a big file (1 TB+) WHILE it is being transferred Posted: 29 Jul 2021 10:47 AM PDT EDIT — To clarify/summarize, the scenario is the following: - Context: Large file (1 TB+) on server A, virtually no disk space left on server A, disk utilization on A keeps growing rapidly and that can't be stopped and there's no practical way to add more storage without interrupting production processes - Goal: Move the "huge file" from A to another machine B, and delete already transferred parts of the file from A's disks while the file is being transferred (the transfer could take a while given the file size, but the disk utilization keeps growing ruthlessly, so we can't just wait for the transfer to finish) Original request: Is there a standard solution to delete big files (think 1 TB+) as they are being transferred via rsync/scp? The solutions that I've found require extra disk space to first split the file into pieces. However, what if there is virtually no disk space left for these operations? In the scp/rsync man pages, I only found switches that delete files after they've been fully transferred. PS: Please note that I'm primarily looking for a mature standard solution, not a bash script / hack. I think it shouldn't be very difficult to come up with something using tools like |
null characters at the beginning of an ASCII log file Posted: 29 Jul 2021 08:34 AM PDT We have an java application that log4j2 to generate log file and have script to stop the process before restart it with another script. There is 5 minutes pause between stop and restart at the midnight daily. In the startup script, we use "mv" command to rename the log file with timstamp as extension. The issue is that one of the log file contains null characters( a few MB) at the beginning of the file and the log file becomes binary. a few observation notes to provide more context for this issue: 1.- Same startup script was used in other hosts with identical version of the java application. Don't have this issue at all. 2.- Occured occasionally. Ie., one week all 5 log files get corrupted and another week the log files are fine. 3.- Can not reproduce in similar developer Linux host; only in production Linux host. 4.- Size of the log file typically is about 4 - 6 GB daily. 5.- The application will be stop + 5 minutes pause + start by script at midnight daily. 6.- Used the hexdump to peek into the content of the binary log file. It had a few MB of null characters at the beginning and then followed by the normal typical ASCII content. any suggestions will be appreciated. Thanks! |
SFTP - check and copy recent files to local then archive within sftp Posted: 29 Jul 2021 08:29 AM PDT We have application integration layer over SFTP where the file feeds placed in SFTP server on random time interval like every 10 minute or 30 min interval and our need is to copy files from SFTP path to local, after complete of file copy to local then move those copied files to Archive directory in sftp server currently using expect method to copy the files via cronjob but below script is not sufficient for actual need above mentioned. Please help to enhance this script or with other options, struggling with minimal knowledge of scripting Does except method SFTP connection will get timeout? |
Can named pipes/FIFOs be used in a "cyclic" manner together with `tee`? Posted: 29 Jul 2021 08:01 AM PDT Why does the last line in this script gets stuck? Below is the question as I original wrote it, but it contains a lot of unnecessary details. However, I'm keeping it just in case someone is curious to know how I bumped into this. Here goes: Is it possible to use named pipes/fifos in a cyclic way? Something like this: Here's the problem I had to solve. I wanted to write a Bash utility to fetch all the tags of a Docker image using the Docker Hub API. The basic request is this: You'll notice that the response includes a link to the next page in case the total count of image tags is greater than the number of items requested per page (which has an upper limit of 100). Additionally, the The problem looked recursive to me, which is what I attempted to do, and managed to solve it in the end by piping into a recursive call: Maybe this isn't ideal and I'm happy to receive suggestions on improving it, but for the purposes of this question I'm interested in whether the problem can be solved by using FIFO's. Probably FIFO's are not the best tool for the job, but I've just recently found out about them, so my mind tries to apply them even when they might not be ideal. In any case, here's what I've tried, but failed, to do when approaching the problem from a FIFO perspective. In short, I've tried to reproduce the diagram posted at the beginning of the question: Finally, here are my questions (and thank you for reading up until this point):
Thanks! And let me know if I should provide further details. |
Hostapd active, but no WIFI signal with ath9k Posted: 29 Jul 2021 07:13 AM PDT I'm trying to set up a wifi access point with hostapd, which seems to be running fine, but I can't see the hotspot on another device. The wifi card is DNXA-116 with AR9382 chipset. When running the same hostapd configuration with an Intel AC 3160 chip everything works like it should. The difference is the driver. I'm running a linux qmx6 kernel 5.0.7. With the Intel chip, after installing the driver, I basically followed this guide and it worked: https://developer.toradex.com/knowledge-base/wi-fi-access-point-mode With the Atheros chip, I've tried many more configurations in etc/hostapd.conf with no luck yet. Below is a list of relevant output in terminal. The contents in the configuration files are basic as in the guide in the link above. If someone has insight to share on what else to look for that would be awesome. UPDATE The AP problem was solved by using legacy PCIe interrupts instead of MSI: https://community.toradex.com/t/pcie2usb-card-on-apalis-imx6/5357#answer-6285, but other problems arise. By passing pci=nomsi in the kernel command line legacy mode is used globally. This makes the AR9382 chip work for setting up an AP, but breaks other parts of the system. The question now is how can I set only 03:00.0 to legacy mode? echo 0 > /sys/bus/pci/devices/$bridge/msi_bus from 4.5.2 in https://www.kernel.org/doc/html/v5.7/PCI/msi-howto.html doesn't work. |
Tmux sessions get killed on ssh logout Posted: 29 Jul 2021 09:28 AM PDT I am using tmux on a remote machine that I access over ssh. For some reason, the tmux sessions do not persist between consecutive ssh login sessions. I do not have this issue while logging into this other remote machine that I have access to. This is essentially the same issue as described in this question. However, the machine that I use already uses Exact steps taken:
|
How to make nc listen for remote connections Posted: 29 Jul 2021 09:22 AM PDT I'm trying to listen for a remote connection but This is the command I used: |
How to properly set Environment variables (golang on Manjaro) Posted: 29 Jul 2021 09:41 AM PDT I have a problem with my go installation. I'm using Manjaro and I think it is related to this as Manjaro seems to handle the go env differently then suggestest by ubuntu and windows. I have go installed and can run code as expected: Then I check if there any enviroment variables set with: So there are non as it seems which is odd. Why could I run my test program? I try to check for environment variables another way: That is interesting. Go itself seems to have some knowledge of the environment variables. That's probably why I can run go code from anywhere, effectively targeting OK, that means I have to edit my ~/.bash_profile I guess. Finally I get the result I want as it seems: Thats great now I can use packages from the Well maybe not. So I try glide: So it turns out that no matter what pack I have in At this point I don't know anymore what to do. |
How to replace Ubuntu with Arch on a dual boot? Posted: 29 Jul 2021 10:06 AM PDT I want to replace Ubuntu Linux on my current set up. Currently I have a dual boot with Ubuntu Mate and Windows 10. I would like replace the Ubuntu installation with Arch. But before I do so I was wondering what preparation I should do before erasing So should the settings be saved? If yes how is this accomplished. Further down you see that I have three hard drives |
How do I create a new empty file in a bash script? Posted: 29 Jul 2021 07:48 AM PDT I'm running some third-party Perl script written such that it requires an output file for the output flag, Unfortunately, the script appears to require an actual file, that is, users must create an empty file Question: How would I create an empty file within a bash script? If one simply tries |
How to extract unique values from column #x with its corresponding values of column #y? Posted: 29 Jul 2021 09:04 AM PDT I have a comma',' FS filename as csv with n number of columns. I need to extract the unique value from Content of file I tried the following command but it is only for The expected output would be: |
Remove specific word in variable Posted: 29 Jul 2021 10:55 AM PDT In a |
HPC ssh "connection closed by remote host" Posted: 29 Jul 2021 07:08 AM PDT My HPC installed LSF job scheduler. I logon the login node (I use xshell) and using interactive job submission command Thus, I entered one of the HPC node, for example Then I want to enter another node, for example I successfully entered So how to maintain this connection? The following message is generated when using |
what is the difference between "ssh user@ip" and "ssh ip user"? Posted: 29 Jul 2021 09:47 AM PDT I am facing problem with one of the above. Only Because of this I GUESS one of the application which uses the problematic syntax is not able to login. |
How can I send stdout to multiple commands? Posted: 29 Jul 2021 09:30 AM PDT There are some commands which filter or act on input, and then pass it along as output, I think usually to I'm most familiar with OS X and so there are two that come to mind immediately are Anyhow, I know that if I want to take stdout and spit the output to go to both I want to know how I can split There is probably a better example than that one, but I really am interested in knowing how I can send stdout to a command that does not relay it and while keeping Also - I'm not asking how to send this to a file and Finally, you may ask "why not just make pbcopy the last thing in the pipe chain?" and my response is 1) what if I want to use it and still see the output in the console? 2) what if I want to use two commands which do not output Oh, and one more thing - I realize I could use |
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