Recent Questions - Unix & Linux Stack Exchange |
- As hardware developer (like arduino board etc.), Does one have to license PCB's files under GPLv2/3 if it's software use (go with) GPL licensed parts?
- How to read multiple variables from a file
- Chicken-egg problem with the shebang line [duplicate]
- VirtualBox Whonix VM: WiFi doesn't work :(
- Router blocking one specific device
- How to gain shell access to IoT device which lets me execute ANY shell script via its update functionality?
- how to join inventory items in a comma delimited list?
- Can't rm directory in /mnt
- Custom URI handling: xdg-open and Firefox work, but Chrome doesn't
- Awk, bash : Combining multiple files with data calculations spanning several lines
- cdo command to rename the file on specific after some operation using bash script
- Are there attempts to develop a more accessible sed?
- How to wrap this command in a bash script?
- CentOS 7 - Where to add FTP port?
- Inability to change monitor's display
- Extract files name from .7z format file one by one and send the name as parameter to a java program from terminal
- "Permission denied" with ffmpeg (via snap) on external drive
- How to clear history in zsh
- What are file-level snapshots , is there any file system that supports this feature?
- Enabling networking in a systemd-nspawn container
- How to see what port was blocked in iptables log file?
- Solaris 11 in Maintenence mode: nfs mount: : RPC: Rpcbind failure - RPC: Unable to receive
- How can I print a variable with padded center alignment?
- Does the O_DIRECT flag bypass the Linux page cache when accessing block devices too?
- Starting Wait for Plymouth Boot Screen to Quit
- opening multiple URLs from a text file as different tabs in Firefox/Chrome?
- How to change user on SWAT page (or how to control Samba by nonprivileged user)
Posted: 19 Sep 2021 09:45 AM PDT I'm just trying to understand opensource licenses as a hardware dev. Also I'm not fully understanding GPLv3 about Tivoization part. |
How to read multiple variables from a file Posted: 19 Sep 2021 09:39 AM PDT Example File
This is what I did and it worked Note: Item number is prompted from the user prior to this and it determines which file to open. This while loop correctly reads the file, stores the variables, and gives the desired output. The issue is, I used this same exact while loop two more times and it's not working. For some reason in the other two scenarios, simpleName and itemName are coming up blank, but the rest are working correctly. Here's an example of where it is NOT working Here, the output comes out incorrectly as
So $simpleName is blank for some reason. I can't figure out why it works in the first instance but not this instance. Note: Both instances are within separate script files. I'm aware that there are simpler ways to do things, however, I'm restricted to very very basic commands, I am not allowed to use sed, awk, grep, find, pretty much just what you see below. |
Chicken-egg problem with the shebang line [duplicate] Posted: 19 Sep 2021 08:33 AM PDT The first line of any shell script must be the shebang line. The shebang line tells which interpreter should be used to execute the shell script. But it seems there's some logic issue here:
This looks like a chicken-egg problem. Or is there some meta-interpreter? Could anyone shed some light? Thanks. |
VirtualBox Whonix VM: WiFi doesn't work :( Posted: 19 Sep 2021 08:18 AM PDT I am having a problem that I just can't fix, no matter what I try. :( I am using Fedora 34 and installed VirtualBox. I am launching a Whonix VM on it. Sadly, the WiFi doesn't work on it. I am having the default settings (NAT). Whonix Gateway as well as Whonix Workstation are both running. Whonix Workstation's Device settings says NAT, "Enable Network Adapter" is enabled, and "Cable connected" as well. On Whonix Gateway too. If you need more logs, please tell me which command I have to use for the output I can give you then. I have recently used the following command to update my Whonix Workstation (the Gateway update worked well).
Unfortunately, this didn't work. This is the output I got: $ sudo apt-get-update-plus dist-upgrade Ign:1 tor+https://deb.debian.org/debian bullseye InRelease Ign:2 tor+https://fasttrack.debian.net/debian bullseye-fasttrack InRelease Ign:3 tor+https://deb.whonix.org bullseye InRelease Ign:4 tor+https://deb.debian.org/debian bullseye-updates InRelease Ign:2 tor+https://fasttrack.debian.net/debian bullseye-fasttrack InRelease Ign:3 tor+https://deb.whonix.org bullseye InRelease Ign:5 tor+https://deb.debian.org/debian-security bullseye-security InRelease Ign:3 tor+https://deb.whonix.org bullseye InRelease Ign:2 tor+https://fasttrack.debian.net/debian bullseye-fasttrack InRelease Ign:6 tor+https://deb.debian.org/debian bullseye-backports InRelease Err:3 tor+https://deb.whonix.org bullseye InRelease Read error - read (104: Connection reset by peer) Reading the greet back from SOCKS proxy socks5h://127.0.0.1:9050 failed [IP: 127.0.0.1 9050] Err:2 tor+https://fasttrack.debian.net/debian bullseye-fasttrack InRelease Read error - read (104: Connection reset by peer) Reading the greet back from SOCKS proxy socks5h://127.0.0.1:9050 failed [IP: 127.0.0.1 9050] Ign:1 tor+https://deb.debian.org/debian bullseye InRelease Ign:4 tor+https://deb.debian.org/debian bullseye-updates InRelease Ign:5 tor+https://deb.debian.org/debian-security bullseye-security InRelease Ign:6 tor+https://deb.debian.org/debian bullseye-backports InRelease Ign:1 tor+https://deb.debian.org/debian bullseye InRelease Ign:4 tor+https://deb.debian.org/debian bullseye-updates InRelease Ign:5 tor+https://deb.debian.org/debian-security bullseye-security InRelease Ign:6 tor+https://deb.debian.org/debian bullseye-backports InRelease Err:1 tor+https://deb.debian.org/debian bullseye InRelease Read error - read (104: Connection reset by peer) Reading the greet back from SOCKS proxy socks5h://127.0.0.1:9050 failed [IP: 127.0.0.1 9050] Err:4 tor+https://deb.debian.org/debian bullseye-updates InRelease Read error - read (104: Connection reset by peer) Reading the greet back from SOCKS proxy socks5h://127.0.0.1:9050 failed [IP: 127.0.0.1 9050] Err:5 tor+https://deb.debian.org/debian-security bullseye-security InRelease Read error - read (104: Connection reset by peer) Reading the greet back from SOCKS proxy socks5h://127.0.0.1:9050 failed [IP: 127.0.0.1 9050] Err:6 tor+https://deb.debian.org/debian bullseye-backports InRelease Read error - read (104: Connection reset by peer) Reading the greet back from SOCKS proxy socks5h://127.0.0.1:9050 failed [IP: 127.0.0.1 9050] Reading package lists... Done E: Failed to fetch tor+https://deb.debian.org/debian/dists/bullseye/InRelease Read error - read (104: Connection reset by peer) Reading the greet back from SOCKS proxy socks5h://127.0.0.1:9050 failed [IP: 127.0.0.1 9050] E: Failed to fetch tor+https://deb.debian.org/debian/dists/bullseye-updates/InRelease Read error - read (104: Connection reset by peer) Reading the greet back from SOCKS proxy socks5h://127.0.0.1:9050 failed [IP: 127.0.0.1 9050] E: Failed to fetch tor+https://deb.debian.org/debian-security/dists/bullseye-security/InRelease Read error - read (104: Connection reset by peer) Reading the greet back from SOCKS proxy socks5h://127.0.0.1:9050 failed [IP: 127.0.0.1 9050] E: Failed to fetch tor+https://deb.debian.org/debian/dists/bullseye-backports/InRelease Read error - read (104: Connection reset by peer) Reading the greet back from SOCKS proxy socks5h://127.0.0.1:9050 failed [IP: 127.0.0.1 9050] E: Failed to fetch tor+https://fasttrack.debian.net/debian/dists/bullseye-fasttrack/InRelease Read error - read (104: Connection reset by peer) Reading the greet back from SOCKS proxy socks5h://127.0.0.1:9050 failed [IP: 127.0.0.1 9050] E: Failed to fetch tor+https://deb.whonix.org/dists/bullseye/InRelease Read error - read (104: Connection reset by peer) Reading the greet back from SOCKS proxy socks5h://127.0.0.1:9050 failed [IP: 127.0.0.1 9050] E: Some index files failed to download. They have been ignored, or old ones used instead. user@host:~$ sudo apt-get-update-plus dist-upgrade Ign:1 tor+https://fasttrack.debian.net/debian bullseye-fasttrack InRelease Ign:2 tor+https://deb.whonix.org bullseye InRelease Ign:3 tor+https://deb.debian.org/debian bullseye InRelease Ign:4 tor+https://deb.debian.org/debian bullseye-updates InRelease Ign:1 tor+https://fasttrack.debian.net/debian bullseye-fasttrack InRelease Ign:2 tor+https://deb.whonix.org bullseye InRelease Ign:1 tor+https://fasttrack.debian.net/debian bullseye-fasttrack InRelease Ign:2 tor+https://deb.whonix.org bullseye InRelease Ign:5 tor+https://deb.debian.org/debian-security bullseye-security InRelease Ign:6 tor+https://deb.debian.org/debian bullseye-backports InRelease Err:1 tor+https://fasttrack.debian.net/debian bullseye-fasttrack InRelease Read error - read (104: Connection reset by peer) Reading the greet back from SOCKS proxy socks5h://127.0.0.1:9050 failed [IP: 127.0.0.1 9050] Err:2 tor+https://deb.whonix.org bullseye InRelease Read error - read (104: Connection reset by peer) Reading the greet back from SOCKS proxy socks5h://127.0.0.1:9050 failed [IP: 127.0.0.1 9050] Ign:3 tor+https://deb.debian.org/debian bullseye InRelease Ign:4 tor+https://deb.debian.org/debian bullseye-updates InRelease Ign:5 tor+https://deb.debian.org/debian-security bullseye-security InRelease Ign:6 tor+https://deb.debian.org/debian bullseye-backports InRelease Ign:3 tor+https://deb.debian.org/debian bullseye InRelease Ign:4 tor+https://deb.debian.org/debian bullseye-updates InRelease Ign:5 tor+https://deb.debian.org/debian-security bullseye-security InRelease Ign:6 tor+https://deb.debian.org/debian bullseye-backports InRelease Err:3 tor+https://deb.debian.org/debian bullseye InRelease Read error - read (104: Connection reset by peer) Reading the greet back from SOCKS proxy socks5h://127.0.0.1:9050 failed [IP: 127.0.0.1 9050] Err:4 tor+https://deb.debian.org/debian bullseye-updates InRelease Read error - read (104: Connection reset by peer) Reading the greet back from SOCKS proxy socks5h://127.0.0.1:9050 failed [IP: 127.0.0.1 9050] Err:5 tor+https://deb.debian.org/debian-security bullseye-security InRelease Read error - read (104: Connection reset by peer) Reading the greet back from SOCKS proxy socks5h://127.0.0.1:9050 failed [IP: 127.0.0.1 9050] Err:6 tor+https://deb.debian.org/debian bullseye-backports InRelease Read error - read (104: Connection reset by peer) Reading the greet back from SOCKS proxy socks5h://127.0.0.1:9050 failed [IP: 127.0.0.1 9050] Reading package lists... Done E: Failed to fetch tor+https://deb.debian.org/debian/dists/bullseye/InRelease Read error - read (104: Connection reset by peer) Reading the greet back from SOCKS proxy socks5h://127.0.0.1:9050 failed [IP: 127.0.0.1 9050] E: Failed to fetch tor+https://deb.debian.org/debian/dists/bullseye-updates/InRelease Read error - read (104: Connection reset by peer) Reading the greet back from SOCKS proxy socks5h://127.0.0.1:9050 failed [IP: 127.0.0.1 9050] E: Failed to fetch tor+https://deb.debian.org/debian-security/dists/bullseye-security/InRelease Read error - read (104: Connection reset by peer) Reading the greet back from SOCKS proxy socks5h://127.0.0.1:9050 failed [IP: 127.0.0.1 9050] E: Failed to fetch tor+https://deb.debian.org/debian/dists/bullseye-backports/InRelease Read error - read (104: Connection reset by peer) Reading the greet back from SOCKS proxy socks5h://127.0.0.1:9050 failed [IP: 127.0.0.1 9050] E: Failed to fetch tor+https://fasttrack.debian.net/debian/dists/bullseye-fasttrack/InRelease Read error - read (104: Connection reset by peer) Reading the greet back from SOCKS proxy socks5h://127.0.0.1:9050 failed [IP: 127.0.0.1 9050] E: Failed to fetch tor+https://deb.whonix.org/dists/bullseye/InRelease Read error - read (104: Connection reset by peer) Reading the greet back from SOCKS proxy socks5h://127.0.0.1:9050 failed [IP: 127.0.0.1 9050] E: Some index files failed to download. They have been ignored, or old ones used instead. Thank you very much! |
Router blocking one specific device Posted: 19 Sep 2021 09:14 AM PDT I'm trying to connect my computer to the internet via a new router, and it is refusing to work in the most baffling way I've ever encountered.
Things I have tried
Other useful information [added]
SummaryIt seems this router has it in for my computer no matter what I do. Somehow it even recognises my computer when it's hiding behind my phone, with a fake MAC address, and with a fresh operating system. At this point, my best guess is that some hardware identifying information is somehow getting into the ping packets, and that something after the router is blacklisting it. So, the questions are the obvious ones:
|
Posted: 19 Sep 2021 07:35 AM PDT I have this IoT device that I want to analyse and try to gain root access to. I can connect to it via ssh/PuTTY but obviously don't have any login information. In one of the firmware updates for this device, I discovered that I can upload any .tar.bz2 archive to its webserver which then gets extracted and a My question is: How can I gain access to a shell on this system? I mean, it seems like I can upload ANY archive containing a custom script to it which will then get executed. This must be jackpot right? Unfortunately, I am too much of a noob to come up with a solution for this. As a first step, I tried to execute some commands like |
how to join inventory items in a comma delimited list? Posted: 19 Sep 2021 07:43 AM PDT I have ansbile inv I want to extract them in a comma delimited list using Jinja template so I add jinja template but I guess item is not a hostvars, so throws error I want end file to look like this |
Posted: 19 Sep 2021 09:28 AM PDT read a bunch of posts about similar issues but can't get it working. I mount a folder on my RPi that sits on my Hackintosh. I use it for backup. Lately I keep getting this error: I have set the permissions to 777 but still no go: Any suggestions on where to begin? Thanks for your help! Edit: I'm sorry, I didnt realize I shouldnt insert images. Took me a few min to edit it. Here is the code in the script I run via cron: |
Custom URI handling: xdg-open and Firefox work, but Chrome doesn't Posted: 19 Sep 2021 08:33 AM PDT I'm trying to configure my Linux environment to open This is the flow I'm using. I'm doing this on a clean Ubuntu machine to make sure it reproduces:
Why is Chrome not respecting the XDG configuration? Update #1: adding more details to answer comment. My My |
Awk, bash : Combining multiple files with data calculations spanning several lines Posted: 19 Sep 2021 07:07 AM PDT I have input data files from 10 devices (numbered 0 to 9) reporting sensor data for each month. Here are some sample data and expected output. Example data file for Example data file for Example data file for I would like to create one file per type of sensor (e.g. CO2) for the whole available data period (here 202105 and 202106) that would look like this The data for each device is reported in columns and each data point is an average over a certain time interval. So one line reports the average value for a time interval of the original data. I'm considering initially only 2 time intervals for each weekday only: a morning time interval from 8:00 to 13:00 (labeled 10:30) and an afternoon time interval from 13:00 to 18:00 (labeled 15:30). I planned to run an Please note that each device reports data at different times and that data may be missing due to device malfunction, network issue, etc. Edited following the comments. |
cdo command to rename the file on specific after some operation using bash script Posted: 19 Sep 2021 07:50 AM PDT I have a lot of nc file and i want to some operation to all of the and to change the name in specific way for example : form this name prAdjust_EUR-11_CNRM-CERFACS-CNRM-CM5_rcp45_r1i1p1_CLMcom-CCLM4-8-17_v1-SMHI-DBS45-MESAN-1989-2010_day_19860101-19901231.nc to prAdjust_EUR-11_CNRM-CERFACS-CNRM-CM5_rcp45_CLMcom_day_mm_jordan_1986-1990.nc but i did not know how to start using Shell script **the command i use is ** then |
Are there attempts to develop a more accessible sed? Posted: 19 Sep 2021 10:05 AM PDT
I would be happy to work with such a |
How to wrap this command in a bash script? Posted: 19 Sep 2021 06:10 AM PDT I have an existing bash script that I call like this: I frequently change the It's getting tedious to keep retyping this command, so I would like to wrap it in another script and pass just those three parameters like this: Side note: I changed the order of the arguments because "function_name" is the one that changes least frequently. I am getting overwhelmed by quoting and escaping when I try to make this wrapper script. I looked at the script in shellcheck.net and I also tried using an array for This is one of my many failed attempts: wrapper.sh Here's another example of a failed attempt: In the above example, if I enter the output of the echo statement on the command line, it works correctly. But the wrapper fails with: For completeness, myscript.sh is similar to this: |
CentOS 7 - Where to add FTP port? Posted: 19 Sep 2021 09:45 AM PDT I have a VM with no firewalld or iptables services running. I need to set up an ftp server. I am unable to connect and ends up with 421 service not available error. However I could find the vfstpd service running and have disabled selinux. Trying to debug/understand.. How/where can I add the ftp port in the server? Should I explicitly add or the default (21) would be picked automatically? Have not used linux much. Your thoughts would be helpful. Thank you UPDATE |
Inability to change monitor's display Posted: 19 Sep 2021 06:15 AM PDT It seems that my monitor's display can't be changed from 1024 x 728. I read that this may be due to a new update. I use Linux Mint 20.2 Uma. Should I try updating my GPU drivers? Should I move to an older version? Is there anything else that may be the problem? I have an Intel Corporation Haswell-ULT Integrated Graphics Controller. |
Posted: 19 Sep 2021 10:02 AM PDT I am trying to write a bash script that will first extract files one by one and call a java program with the file name as parameter to do some stuff. I have tried with the following stuff but it does not work. I am facing the following problem. The zip file name is compressed.7z. There are 2 files inside the compressed.7z file. sample_1.json and sample_2.json (can be anything). The 7z command always give the compressed.7z as file name which I don't want. I just want to get extract sample_1.json in the output folder and give the name to the java command then sample_2.json in the next iteration. Could anybody can help in this issues? Thanks in advance. |
"Permission denied" with ffmpeg (via snap) on external drive Posted: 19 Sep 2021 08:35 AM PDT I got a new drive and I can copy files fine with simple Permissions seem fine unless I'm missing something But ffmpeg keeps complaing Simply copying like below works fine.. Any ideas on what is going on? This is pretty annoying. Note ffmpeg is installed at |
Posted: 19 Sep 2021 09:29 AM PDT I'm looking for the zsh equivalent of the bash command Just to clarify, I'm not looking for a way to delete the contents of There is a workaround I use for now, but it's obviously less than ideal: in the current session I set |
What are file-level snapshots , is there any file system that supports this feature? Posted: 19 Sep 2021 06:49 AM PDT I am trying to understand what are file level snapshosts. Anyone has idea as to which filesystems supports this so that I can try it out. |
Enabling networking in a systemd-nspawn container Posted: 19 Sep 2021 08:05 AM PDT I'm trying to setup container that has access to the internet but have been unsuccessful so far. On the host Any ideas why it's not working? |
How to see what port was blocked in iptables log file? Posted: 19 Sep 2021 10:06 AM PDT I have created few iptables rules and I have tested them. I created and I have added other rules to allow specific ports. I want to see the DROPPED packets. I am using port 9191 for IIS websites. I can't reach websites because it is being blocked. |
Solaris 11 in Maintenence mode: nfs mount: : RPC: Rpcbind failure - RPC: Unable to receive Posted: 19 Sep 2021 09:08 AM PDT There is an issue with Solaris 11 machine and it boots automatically to the single user mode.We can see the error message "nfs mount: : RPC: Rpcbind failure - RPC: Unable to receive". The machine is a LDom . I booted through OS Image and found that there was an entry in vfstab corresponding to the same. It was removed and tried to start the server again but still the same. I cross checked and there was no entries in dfstab.As in attached image we can see that the network milestone is maintenance mode. Kindly guide me what further investigation and action need to be taken as this is an critical server and need to solve the issue asap. Kindly let me know if any further info required. |
How can I print a variable with padded center alignment? Posted: 19 Sep 2021 09:30 AM PDT How can I print |
Does the O_DIRECT flag bypass the Linux page cache when accessing block devices too? Posted: 19 Sep 2021 07:16 AM PDT I am running a lot of KVM virtual machines, which open the hard disk image with the I understand, according to the NB: the use case of |
Starting Wait for Plymouth Boot Screen to Quit Posted: 19 Sep 2021 06:05 AM PDT I'm struggling to install Kubuntu 15.04 on my PC. I've got a GTX 970 which i think is throwing off the trial mode from starting up. nomodeset doesn't work, so I tried nouveau.noaccel=1 to beget this error screen. At this point I don't fully understand how to proceed, so any help would be great. |
opening multiple URLs from a text file as different tabs in Firefox/Chrome? Posted: 19 Sep 2021 09:02 AM PDT How I would go about opening multiple URLs from a text file as different tabs in Firefox/Chrome? My text file is just a list of URLs, one per line: |
How to change user on SWAT page (or how to control Samba by nonprivileged user) Posted: 19 Sep 2021 07:01 AM PDT I logged into SWAT with my nonprivileged user, since the root account is usually disabled on modern Linux systems. I cannot control any Samba parameters by this user. Once I enable the root account, how should I logout from SWAT and re-login into SWAT as root? Or how should I make my nonprivileged user to be able to control Samba parameters? Put the user into certain group? Specify the user in some SWAT config as a privileged one? |
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