How to send literal Ctrl-X in GNU Screen? Posted: 18 Aug 2021 10:06 AM PDT On occasion, when using Vim inside GNU Screen, I will want to use the Ctrl+A/Ctrl+X commands to increment or decrement numbers, respectively. In GNU Screen, I know that I can send a literal Ctrl+A with Ctrl+A a . But how do I send a literal Ctrl+X? The default mapping is to lock the screen. I'm fine with re-mapping that. But what would I re-map it to? GNU Screen doesn't seem to have any "send literal keypress" command... Is there a way? |
How to increase root disk space on my AWS EC2 machine Posted: 18 Aug 2021 09:55 AM PDT How to increase root disk space on my AWS EC2 machine. It was 16GB and I increased it to 48GB, but its still problematic, not sure what to do lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT loop0 7:0 0 33.3M 1 loop /snap/amazon-ssm-agent/3552 loop1 7:1 0 25M 1 loop /snap/amazon-ssm-agent/4046 loop2 7:2 0 55.5M 1 loop /snap/core18/2074 loop3 7:3 0 55.4M 1 loop /snap/core18/2128 loop4 7:4 0 67.6M 1 loop /snap/lxd/20326 loop5 7:5 0 32.3M 1 loop /snap/snapd/12398 loop6 7:6 0 70.3M 1 loop /snap/lxd/21029 loop7 7:7 0 32.3M 1 loop /snap/snapd/12704 xvda 202:0 0 48G 0 disk └─xvda1 202:1 0 48G 0 part / df Filesystem 1K-blocks Used Available Use% Mounted on /dev/root 16197480 16177928 3168 100% / devtmpfs 4068964 0 4068964 0% /dev tmpfs 4074932 0 4074932 0% /dev/shm tmpfs 814988 80264 734724 10% /run tmpfs 5120 0 5120 0% /run/lock tmpfs 4074932 0 4074932 0% /sys/fs/cgroup /dev/loop0 34176 34176 0 100% /snap/amazon-ssm-agent/3552 /dev/loop2 56832 56832 0 100% /snap/core18/2074 /dev/loop1 25600 25600 0 100% /snap/amazon-ssm-agent/4046 /dev/loop3 56832 56832 0 100% /snap/core18/2128 /dev/loop4 69248 69248 0 100% /snap/lxd/20326 /dev/loop5 33152 33152 0 100% /snap/snapd/12398 /dev/loop6 72064 72064 0 100% /snap/lxd/21029 /dev/loop7 33152 33152 0 100% /snap/snapd/12704 df -hT Filesystem Type Size Used Avail Use% Mounted on /dev/root ext4 16G 16G 3.1M 100% / devtmpfs devtmpfs 3.9G 0 3.9G 0% /dev tmpfs tmpfs 3.9G 0 3.9G 0% /dev/shm tmpfs tmpfs 796M 79M 718M 10% /run tmpfs tmpfs 5.0M 0 5.0M 0% /run/lock tmpfs tmpfs 3.9G 0 3.9G 0% /sys/fs/cgroup /dev/loop0 squashfs 34M 34M 0 100% /snap/amazon-ssm-agent/3552 /dev/loop2 squashfs 56M 56M 0 100% /snap/core18/2074 /dev/loop1 squashfs 25M 25M 0 100% /snap/amazon-ssm-agent/4046 /dev/loop3 squashfs 56M 56M 0 100% /snap/core18/2128 /dev/loop4 squashfs 68M 68M 0 100% /snap/lxd/20326 /dev/loop5 squashfs 33M 33M 0 100% /snap/snapd/12398 /dev/loop6 squashfs 71M 71M 0 100% /snap/lxd/21029 /dev/loop7 squashfs 33M 33M 0 100% /snap/snapd/12704 |
Spark ignore timezone information in a timestamp Posted: 18 Aug 2021 09:44 AM PDT I have tried to load to a spark data frame but seems like it ignores the timezone of a timestamp and uses spark timezone instead. Here is a code to run it. from pyspark.sql import SparkSession, Row from datetime import datetime import pytz import os spark = SparkSession.builder.getOrCreate() spark.conf.set("spark.sql.session.timeZone", "Europe/Moscow") df = spark.createDataFrame([ Row(user_id = 'user_id', time=pytz.timezone("UTC").localize(datetime.combine(datetime(2020, 1, 1), datetime.min.time()))) ]) for row in df.collect(): print(row['time']) print(pytz.timezone("UTC").localize(datetime.combine(datetime(2020, 1, 1), datetime.min.time()))) df.show() Here is the output in this case 2020-01-01 03:00:00 2020-01-01 00:00:00+00:00 +-------+-------------------+ |user_id| time| +-------+-------------------+ |user_id|2020-01-01 03:00:00| +-------+-------------------+ Could you please tell me if it's expected behavior? |
Understanding $@ in bash or zsh Posted: 18 Aug 2021 09:56 AM PDT myFun1 and myFun2 below don't produce the same output. Why? #!/bin/bash myFun1() { local item IFS=: for item in "${@}"; do echo "->${item}<-" done } myFun2() { local items="${@}"; local item IFS=: for item in "${items}"; do echo "->${item}<-" done } Invoking myFun1 "a=b" "c='d 1'" "e" produces ->a=b<- ->c='d 1'<- ->e<- whereas myFun2 "a=b" "c='d 1'" "e" produces ->a=b c='d 1' e<- |
grep results of wildcard show up as blank lines with files ending in CRLF Posted: 18 Aug 2021 09:26 AM PDT To show only the term I wish to find (for example, temperature ) and the immediately surrounding text, I am calling grep ".\{0,5\}temperature.\{0,5\}" * This command works fine when the files have Unix end-of-lines. However, when searching files created in Windows (that end in CRLF), instead of grep showing the right result, the entire line appears blank whenever CRLF is within the 5-character range. I have tried the -U (binary) flag to no avail. Here is the file I am using to test. I have a version saved with CRLF endings (test_dos.txt), and another with just LF (test_unix.txt): the body temperature is the variable temperature12345678 temperature1234567 temperature123456 temperature12345 temperature1234 temperature123 temperature12 temperature1 temperature woie temperature!! tempe oaj The result of calling grep -o ".\{0,5\}temperature.\{0,5\}" * is: test_dos.txt:body temperature is t test_dos.txt:temperature12345 test_dos.txt:temperature12345 test_dos.txt:temperature12345 test_dos.txt:temperature12345 test_dos.txt:woie temperature!! te test_unix.txt:body temperature is t test_unix.txt:temperature12345 test_unix.txt:temperature12345 test_unix.txt:temperature12345 test_unix.txt:temperature12345 test_unix.txt:temperature1234 test_unix.txt:temperature123 test_unix.txt:temperature12 test_unix.txt:temperature1 test_unix.txt:temperature test_unix.txt:woie temperature!! te What can I do so that grep shows the correct results with the Windows/DOS file? |
How can I use sftp commands when running putty's 'psftp' interface? [migrated] Posted: 18 Aug 2021 08:59 AM PDT I have a batch file on windows (transfer.bat) with the following command: psftp.exe -i WINKEY_rsa.ppk login@ipaddress -b send.bat In my send.bat I have: sftp login@emts.extra.chrysler.com put TESTEDI I get errors saying 'psftp: unknown command sftp'. Is there anyway to execute the commands in my send.bat file on the server? What I need to do is connect to the server from my windowsw PC using psftp, then from the server connect to chrysler using sftp. |
Downloading most Snapd packages without systemd daemon Posted: 18 Aug 2021 08:58 AM PDT How can we download most Snapd packages without systemd daemon/service or further without Snapd altogether, but instead by another definitive workaround method? |
How to create nested directory with a specified permission bit for each of the parents directory created? Posted: 18 Aug 2021 08:58 AM PDT The following isn't working as expected, and I am trying to understand if this is a bug or is there a hidden configuration in my linux machine that prevented it to create the folder with the correct permission. As a last resort, I could always fallback to creating the folder one by one, but I hope it doesn't come to this. Here's what I do: mkdir -m777 /familytree mkdir -m755 -p /familytree/great-grandparent/grandparent/parent/myself/ This is what I got: $ namei -m /root/grandparent/parent/myself/ dr-xr-xr-x / drwxrwxrwx familytree drwx------ great-grandparent drwx------ grandparent drwx------ parent drwxr-xr-x myself Here's what I expected: $ namei -m /root/grandparent/parent/myself/ dr-xr-xr-x / drwxrwxrwx familytree drwxr-xr-x great-grandparent drwxr-xr-x grandparent drwxr-xr-x parent drwxr-xr-x myself |
grep should find a hex value in a file but doesn't Posted: 18 Aug 2021 09:02 AM PDT Here is the beginning of a file: # hexdump -n 550 myFile 0000000 f0f2 f5f0 f7f9 f1f1 f1f0 f0f0 e3f1 f3c8 0000010 f3f5 0000 0000 000c 0000 0000 0000 000c 0000020 0000 0c00 0000 0000 0000 0c00 0000 0000 0000030 000c 0000 0000 0000 000c 0000 0c00 0000 0000040 0000 0000 0c00 0000 0000 000c 0000 0000 0000050 0000 000c 0000 0c00 0000 0000 0000 0c00 0000060 0000 0000 000c 0000 0000 0000 000c 0000 * 00000b0 0000 0000 000c 0000 0000 0000 0000 0000 00000c0 0000 0000 0000 0c00 0000 0000 0000 0c00 00000d0 0000 0000 000c 0000 0000 0000 000c 0000 00000e0 0c00 0000 0000 0000 0c00 0000 0000 000c 00000f0 0000 0000 0000 000c 0000 0c00 0000 0000 0000100 0000 0c00 0000 0000 000c 0000 0000 0000 0000110 000c 0000 0c00 0000 0000 0000 0c00 0000 0000120 0000 0000 0c00 0000 0000 0000 0c00 0000 * 0000160 0000 0000 0c00 0000 0000 0000 0000 0000 0000170 0000 0000 0000 0000 000c 0000 0000 0000 0000180 000c 0000 0c00 0000 0000 0000 0c00 0000 0000190 0000 000c 0000 0000 0000 000c 0000 0c00 00001a0 0000 0000 0000 0c00 0000 0000 000c 0000 00001b0 0000 0000 000c 0000 0c00 0000 0000 0000 00001c0 0c00 0000 0000 000c 0000 0000 0000 000c 00001d0 0000 0000 0000 000c 0000 0000 0000 000c * 0000210 0000 0000 0000 000c 0000 0000 0000 0000 0000220 0000 0000 0a00 0000226 in which we can see the hex values 0c and 0a I don't understand why grep finds 0c but not 0a : # grep -P '\x0c' myFile Fichier binaire myFile correspondant # grep -P '\x0a' myFile <nothing in the output> I am using CentOS. |
How do I delete a chrx partition on an HP Chromebook? Posted: 18 Aug 2021 08:07 AM PDT I tried to dual boot my Chromebook with Gallium, but didn't realize my Chromebook wasn't supported. I only have `1.5 GB of storage for ChromeOS, so everything I've tried hasn't worked. I tried the Chrome Recovery Utility, and it hasn't worked. I tried deleting the partition, but I can't make sense of the only tutorial here because it doesn't apply to my Chromebook. The model is an HP Chromebook 14. Can anyone help? |
System freezes at login, in recovery mode and in TTYs Posted: 18 Aug 2021 08:56 AM PDT Summary: After updating drivers and installing Ubuntu Studio on top of Linux Mint 20.2 (Uma), my computer freezes at login no matter what I'm trying. Backstory: After realizing my computer is not compatible with Windows 11 and being tired of the OS in general, I switched to Linux. I tried a couple of distros and decided to go with Linux Mint. I tried Zorin OS, but I kept getting this same error when trying to log in after installation. I thought it was an issue with Zorin and went with Linux Mint. After I installed it, it ran smoothly, and did what I needed it to do. I updated the drivers to use the NVIDIA driver, and that ran smoothly as well. The issue popped back up when I installed Ubuntu Studio. I installed it, and it asked me to restart. The issue: When it gets to the login page, everything froze. The mouse, keyboard, cursor...everything froze. I can hit Ctrl+Alt+Delete to restart the system when it's frozen, but no other commands or keys will change the frozen screen. Ctrl+Alt+Delete seems to run a command to restart the system, which pops up briefly before the computer restarts. So, it seems like the system still listens to some commands. What I've tried: - Changing the
quiet splash in the GRUB editor to nomodeset . Result: Still freezes at login - Run in "recovery mode". Result: It freezes when the options window pulls up and won't allow me to select an option.
- Hitting the
Ctrl+Alt+F1 (F1-F6) command to try to use a command prompt. Result: Freezes even with the console up. - Run
Alt+PRTSC once frozen. Result: Nothing happens. It stays frozen. Specs: - CPU: Intel i7-7700HQ Kaby Lake-H Mobile
- GPU: NVIDIA GeForce GTX 1060 with 6GB GDDR5
- Display: 15.6 FHD 1080P 120Hz AUO IPS with G-SYNC
- Video Out: 1x HDMI 2.0b, 1x Mini DisplayPort 1.4
- Storage: 256GB M.2 PCIe NVMe SSD, 1TB 5400RPM Seagate SATA
- Memory: 16GB 2400MHz DDR4 SO-DIMM's (8GBx2) 2 Slots
- Wireless: Intel® Dual Band Wireless-AC 8265
- Ethernet: Intel i219-V 10/100/1000 Controller, 1x RJ45 Connector
- Bluetooth: Bluetooth 4.2
- USB: 3x USB 3.0 Type A, 1x USB 3.1 Type C
- Webcam: Full HD 1920x1080, Integrated Digital Mic
- Audio: Realtek ALC 255, Stereo Speakers, 2x 3.5mm (1x Headphone Jack, 1x 3.5mm Mic)
I'm really at a loss of knowing how to fix this. I think looking at logs might help if there is a log of what happens when it freezes. I'm not sure where to go for that. I don't know where to start looking. I also have read that a common issue is with the NVIDIA card and Linux. If that's the case, how do I resolve that? I believe the proper drivers are installed. I've also read that the packages might not have been properly installed, and I would have to run dpkg , but I can't get to the command line without it freezing. I have a version of Linux Mint on a USB that I am currently using, but I'm not sure where I should go to change packages or drivers or whatever I need to do to fix this. Can someone point me in the right direction? How can I use the command line when it's frozen? Can I access it before it logs in? What should I be looking for? Note: The Ubuntu crowd kicked me off their forum and told me to come here since it has to deal with Linux Mint and Zorin and not Ubuntu specifically. |
How do I add multiple fish functions in a single script? Posted: 18 Aug 2021 08:59 AM PDT I'm trying to shift to fish from zsh. As I've seen, load time of fish increases if I use alias. So I'd like to convert all of my alias into functions, but the thing is creating a function script for every alias is a bit hectic. So how do I add those alias in a single function script? |
Root Partition not found after Dell Configuration Tool Posted: 18 Aug 2021 07:38 AM PDT So, I have a dell xps running Manjaro, and recently the computer decided it needed to run some sort of dell configuration tool upon booting (I recently replaced the battery, so perhaps this is what triggered this?). After it did this, I get the following when trying to boot into Manjaro mount: /new_root: can't find UUID=7be69e31_etc_etc. You are now being dropped into an emergency shell. sh: can't access tty: job control turned off. [rootfs ]# Best I can tell is my hard drive cant be found. In fact, if i boot from a live CD, my main hard drive (where the linux root filesystem is installed) doesn't show up in the partition manager. Running "fdisk -l /dev/sda" gives Disk /dev/sda: 14.91 GiB, 16008609792 bytes, 31266816 sectors Disk model: Cruzer Glide Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: dos Disk identifier: 0x12d14d7d Device Boot Start End Sectors Size Id Type /dev/sda1 * 64 6219251 6219188 3G 0 Empty /dev/sda2 6219252 6227443 8192 4M ef EFI (FAT-12/16/32) However, if I go into the grub shell and run ls, I get (hd0), (hd0, gpt2), (hd0, gpt1) It seems that gpt2 is my main 250gig SSD. And "ls (hd0, gpt2)" confirms that the UUID of this partition is "7be69e31_etc_etc". So it seems grub can find the hard drive still... But I have no idea how to get my system to boot again. Im really out of my depth here, so any help is greatly appreciated. |
amidi error: cannot open port "hw:1": Device or resource busy (ALSA midi) Posted: 18 Aug 2021 08:34 AM PDT I am trying to send a direct MIDI reset command (0xFF) to a MIDI keyboard using the amidi utility. Located the Midi device: amidi --list-devices Dir Device Name IO hw:1,0,0 CLASSIC Lighted Rockers 01-016 and sent the reset byte: amidi -p hw:1 -S 'FF' However, I get the following error: ALSA lib rawmidi_hw.c:233:(snd_rawmidi_hw_open) open /dev/snd/midiC1D0 failed: Device or resource busy cannot open port "hw:1": Device or resource busy I do have another C program communicating with the keyboard - does this mean only one utility can communicate with the MIDI keyboard at a time? Seems rather unefficient. Either way, how can I send this reset byte through amidi and the command line without errors? This will be placed in a shell script that is activated when sleep button is pressed. The midi file is open multiple times, so I do not see why amidi can't open it too: root@L006:/dev/snd# lsof | grep '/dev/snd' bash 5849 root cwd DIR 0,5 320 2322 /dev/snd MidiInPro 7603 organ 7r CHR 116,3 0t0 85763 /dev/snd/midiC1D0 MidiOutPr 7609 organ 13w CHR 116,3 0t0 85763 /dev/snd/midiC1D0 MidiOutPr 7609 7615 organ 13w CHR 116,3 0t0 85763 /dev/snd/midiC1D0 MidiOutPr 7609 7616 organ 13w CHR 116,3 0t0 85763 /dev/snd/midiC1D0 MidiOutPr 7609 7617 organ 13w CHR 116,3 0t0 85763 /dev/snd/midiC1D0 MidiOutPr 7609 7623 organ 13w CHR 116,3 0t0 85763 /dev/snd/midiC1D0 MidiOutPr 7609 7624 organ 13w CHR 116,3 0t0 85763 /dev/snd/midiC1D0 MidiOutPr 7609 7625 organ 13w CHR 116,3 0t0 85763 /dev/snd/midiC1D0 MidiOutPr 7609 7626 organ 13w CHR 116,3 0t0 85763 /dev/snd/midiC1D0 MidiOutPr 7609 7627 organ 13w CHR 116,3 0t0 85763 /dev/snd/midiC1D0 MidiOutPr 7609 7628 organ 13w CHR 116,3 0t0 85763 /dev/snd/midiC1D0 MidiOutPr 7609 7629 organ 13w CHR 116,3 0t0 85763 /dev/snd/midiC1D0 MidiOutPr 7609 7630 organ 13w CHR 116,3 0t0 85763 /dev/snd/midiC1D0 MidiOutPr 7609 7631 organ 13w CHR 116,3 0t0 85763 /dev/snd/midiC1D0 MidiOutPr 7609 7632 organ 13w CHR 116,3 0t0 85763 /dev/snd/midiC1D0 MidiOutPr 7609 7633 organ 13w CHR 116,3 0t0 85763 /dev/snd/midiC1D0 MidiOutPr 7609 7634 organ 13w CHR 116,3 0t0 85763 /dev/snd/midiC1D0 MidiOutPr 7609 7635 organ 13w CHR 116,3 0t0 85763 /dev/snd/midiC1D0 MidiOutPr 7609 7636 organ 13w CHR 116,3 0t0 85763 /dev/snd/midiC1D0 MidiOutPr 7609 7637 organ 13w CHR 116,3 0t0 85763 /dev/snd/midiC1D0 MidiOutPr 7609 7638 organ 13w CHR 116,3 0t0 85763 /dev/snd/midiC1D0 MidiOutPr 7609 7639 organ 13w CHR 116,3 0t0 85763 /dev/snd/midiC1D0 MidiOutPr 7609 7640 organ 13w CHR 116,3 0t0 85763 /dev/snd/midiC1D0 ... |
What changes to make to this monolith Kconfig Wifi Driver File to Compile it as a Module ? Right Now , When using Cmake , No Ko file is generated Posted: 18 Aug 2021 09:12 AM PDT This is the current Kconfig File and make file |
zsh completion: complete options requiring number as argument Posted: 18 Aug 2021 10:28 AM PDT I have a script foo , which takes few optional commandline arguments in the form of: foo -A <NUM> -B <NUM> -i or it can also be without space: foo -A<NUM> -B<NUM> -i where NUM is integer number. The script should not complete filenames / directories. I have following completion rules: #compdef foo local -a args _arguments -S \ '*-A' \ '*-B' \ '*-i' What do I have to add, so that the completion is aware that the options -A or -B are not complete by themselves, but need a number before the completion can continue? In another script, I have similar situation, the only differece is the option uses = : foo --port=<PORT> How could I do this also? |
Run arbitrary command in tmux copy mode Posted: 18 Aug 2021 09:31 AM PDT When I select some text in tmux copy mode, can I invoke system command on the selected text, without using a predefined keybinding? For example, I could invoke pastebin to send selected text to pastebin, or invoke wc to count lines. I tried following method, but it didn't work: - select text by
c-b [ - Tried both these ways:
- press
: , hoping to get into command mode - didn't work because this prompts for "go to line" - press
c-b :copy-pipe wc - didn't work because it said copy-pipe is unknown command Note: I'm using Tmux 3.1c I'm aware of solutions like this one. However, that'd require me to foresee each of my use cases and predefine the keybinding for each of possible commands I will execute. In Vim, this is supported, i.e., select text, then :!<system_command> would send the text to system_command . |
how i parse following json array format. i want this filename value in bash or groovy? Posted: 18 Aug 2021 08:56 AM PDT How do I parse the following json array format? I want the filename value filewhichisdeploy in bash or groovy { "filewhichisdeploy":[ { "filename": "value" },{ "filename": "value" } ] } |
Unable to connect to VPN through ProtonVPN on Fedora 34 Posted: 18 Aug 2021 10:05 AM PDT I'm attempting to connect through the GUI obtained from ProtonVPN-website. Here's the log from network_manager.service manager: (ipv6leakintrf0): new Dummy device (/org/freedesktop/NetworkManager/Devices/14) 2021-08-17 11:12:55.678868 <info> device (ipv6leakintrf0): state change: unmanaged -> unavailable (reason 'managed', sys-iface-state: 'external') 2021-08-17 11:12:55.680066 <info> audit: op="connection-add" uuid="cdc7c8ae-e78f-48a6-a52e-641e15dcf94e" name="pvpn-ipv6leak-protection" pid=6479 uid=1000 result="success" 2021-08-17 11:12:55.682187 <info> device (ipv6leakintrf0): state change: unavailable -> disconnected (reason 'none', sys-iface-state: 'managed') 2021-08-17 11:12:55.683701 <info> policy: auto-activating connection 'pvpn-ipv6leak-protection' (cdc7c8ae-e78f-48a6-a52e-641e15dcf94e) 2021-08-17 11:12:55.684139 <info> device (ipv6leakintrf0): Activation: starting connection 'pvpn-ipv6leak-protection' (cdc7c8ae-e78f-48a6-a52e-641e15dcf94e) 2021-08-17 11:12:55.684223 <info> device (ipv6leakintrf0): state change: disconnected -> prepare (reason 'none', sys-iface-state: 'managed') 2021-08-17 11:12:55.684474 <info> device (ipv6leakintrf0): state change: prepare -> config (reason 'none', sys-iface-state: 'managed') 2021-08-17 11:12:55.694026 <info> device (ipv6leakintrf0): state change: config -> ip-config (reason 'none', sys-iface-state: 'managed') 2021-08-17 11:12:55.694355 <info> dhcp4 (ipv6leakintrf0): activation: beginning transaction (timeout in 45 seconds) 2021-08-17 11:12:55.697521 <info> device (ipv6leakintrf0): state change: ip-config -> ip-check (reason 'none', sys-iface-state: 'managed') 2021-08-17 11:12:55.715458 <info> device (ipv6leakintrf0): state change: ip-check -> secondaries (reason 'none', sys-iface-state: 'managed') 2021-08-17 11:12:55.715667 <info> device (ipv6leakintrf0): state change: secondaries -> activated (reason 'none', sys-iface-state: 'managed') 2021-08-17 11:12:55.717302 <info> policy: set 'pvpn-ipv6leak-protection' (ipv6leakintrf0) as default for IPv6 routing and DNS 2021-08-17 11:12:55.717914 <info> device (ipv6leakintrf0): Activation: successful, device activated. 2021-08-17 11:12:55.729584 <info> audit: op="connection-add" uuid="3f0b6832-b8a8-448a-8708-1f16a573b3a1" name="ProtonVPN SE-FI#1" pid=4109 uid=1000 result="success" 2021-08-17 11:12:55.760663 <info> audit: op="connection-activate" uuid="3f0b6832-b8a8-448a-8708-1f16a573b3a1" name="ProtonVPN SE-FI#1" pid=4109 uid=1000 result="success" 2021-08-17 11:12:55.765850 <info> vpn-connection[0x557ca76d0550,3f0b6832-b8a8-448a-8708-1f16a573b3a1,"ProtonVPN SE-FI#1",0]: Started the VPN service, PID 6508 2021-08-17 11:12:55.772617 <info> vpn-connection[0x557ca76d0550,3f0b6832-b8a8-448a-8708-1f16a573b3a1,"ProtonVPN SE-FI#1",0]: Saw the service appear; activating connection 2021-08-17 11:12:55.819688 <error> vpn-connection[0x557ca76d0550,3f0b6832-b8a8-448a-8708-1f16a573b3a1,"ProtonVPN SE-FI#1",0]: Failed to request VPN secrets #3: No agents were available for this request. 2021-08-17 11:12:55.824361 <info> vpn-connection[0x557ca76d0550,3f0b6832-b8a8-448a-8708-1f16a573b3a1,"ProtonVPN SE-FI#1",0]: VPN plugin: state changed: stopped (6) 2021-08-17 11:12:55.872141 <info> audit: op="connection-delete" uuid="3f0b6832-b8a8-448a-8708-1f16a573b3a1" name="ProtonVPN SE-FI#1" pid=4109 uid=1000 result="success" 2021-08-17 11:12:55.939214 <info> device (ipv6leakintrf0): state change: activated -> deactivating (reason 'connection-removed', sys-iface-state: 'managed') 2021-08-17 11:12:55.940029 <info> audit: op="connection-delete" uuid="cdc7c8ae-e78f-48a6-a52e-641e15dcf94e" name="pvpn-ipv6leak-protection" pid=6519 uid=1000 result="success" 2021-08-17 11:12:55.941285 <info> device (ipv6leakintrf0): state change: deactivating -> disconnected (reason 'connection-removed', sys-iface-state: 'managed') 2021-08-17 11:12:55.947148 <info> dhcp4 (ipv6leakintrf0): canceled DHCP transaction 2021-08-17 11:12:55.947179 <info> dhcp4 (ipv6leakintrf0): state changed unknown -> terminated 2021-08-17 11:12:55.957710 <info> device (ipv6leakintrf0): state change: disconnected -> unmanaged (reason 'user-requested', sys-iface-state: 'managed') 2021-08-17 11:12:55.958234 <warn> dns-sd-resolved[06c7c50eee4f29d8]: send-updates SetLinkMulticastDNS@14 failed: GDBus.Error:org.freedesktop.resolve1.NoSuchLink: Link 14 not known The line 2021-08-17 11:12:55.819688 <error> vpn-connection[0x557ca76d0550,3f0b6832-b8a8-448a-8708-1f16a573b3a1,"ProtonVPN SE-FI#1",0]: Failed to request VPN secrets #3: No agents were available for this request. Seems to hint towards an authentication issue? Any ideas? I am able to log in just fine, I have a paid subscription. Attempts to connect through protonvpn-cli produces error: Unable to connect to ProtonVPN: ProtonVPN connection failed due to unknown reason. |
Comparing files in a directory Posted: 18 Aug 2021 07:53 AM PDT Suppose I have x amount of files in a directory (where x = greater than 100) and I want to compare these files for differences. How can I accomplish this task? I am running an Ubuntu 18.04 machine. For the sake of this discussion, assume the said directory is /home/user1/music_list/ and one of the files in the directory is /home/user1/music_list/jazz1.txt. |
What does .$SETUP/dirinfo means in any script? [closed] Posted: 18 Aug 2021 07:40 AM PDT I was analyzing a script file and came across the line .$SETUP/dirinfo What does this mean? |
Why is it possible to "loop" a filesystem by mounting it to one of its folders? Posted: 18 Aug 2021 08:08 AM PDT /dev/sda5 is mounted at / and it's my filesystem piotr@thinkpad:~$ sudo mkdir /home/mpoint piotr@thinkpad:~$ sudo mount /dev/sda5 /home/mpoint so now I can do: piotr@thinkpad:~$ cd /home/mpoint/home/mpoint and when I'm in second mpoint directory, it's empty. My questions are: Why is it possible to "loop" a filesystem by mounting it to one of its folders? Why this second mpoint dir is empty? |
Using Tandberg LTO5 and Debian 10 Buster Posted: 18 Aug 2021 08:53 AM PDT I use PRETTY_NAME="Debian GNU/Linux 10 (buster)" NAME="Debian GNU/Linux" VERSION_ID="10" VERSION="10 (buster)" VERSION_CODENAME=buster ID=debian With an own Kernel Linux 5.4.61 #1 SMP Tue Sep 1 21:08:21 CEST 2020 x86_64 GNU/Linux Added SCSI support and everything. root@server:~# lsscsi [0:0:0:0] tape TANDBERG LTO-5 HH Z629 /dev/st0 [1:0:0:0] disk ATA ST4000VN008-2DR1 SC60 /dev/sda [2:0:0:0] disk ATA ST4000VN008-2DR1 SC60 /dev/sdb [3:0:0:0] disk ATA ST4000VN008-2DR1 SC60 /dev/sdc [7:0:0:0] disk JetFlash Transcend 16GB 1.00 /dev/sdd So, i see the tapedrive but have a lot of trouble with LTFS. I used this website for getting LTFS: https://www.tandbergdata.com/de/index.cfm/solutions/ltfs-for-archive/ltfs-downloads-lto56/ And tried the own building stuff, the RHEL binaries. But the own building says it want new builded with libtool 2.2.6b but I have 2.4.6 and there is no possebility for autoreconf --force --install Well, the RHEL stuff want icu 50.2, but for Debian there is only 52.x or I must build it on my own, but I don't think it's the correct solution to downgrade software to really old stuff. I tried to get HPE StoreOpen for RHEL, but it's only for enterprise customers ands costs money, so it's no option... The LTFS from GitHub supports only IBM drives, so no option... it's so frustrating :( Now I just want to know: Are there any basic debian/linux tools for managing LTO drives: formatting, writing, reading, mounting, etc.? Or can anyone help me to get it working on Debian 10? Thank you in advance. |
SSH connection looking at incorrect private key - unable to connect Posted: 18 Aug 2021 09:02 AM PDT I am having a hard time understanding the output from the command below. I am trying to connect to a godaddy server and have been unsuccessful. I enabled SSH access on godaddy's cpanel, created a public/private key, downloaded the private key, moved it into ~/.ssh and added the key to the keychain using ssh-add -K ~/.ssh/mykey . I am unable to connect. I know there is another question on this site but I am providing actual output and want to know the reason it's failing. I am not sure why it's not looking for SSH key called key4govi (that's what my private key is called. It seems to be looking at they key id_rsa (assuming from the output). Here are my folder contents for the .ssh folder on my local machine: github_rsa github_rsa.pub id_rsa id_rsa.pub key4govi key4govi.pub known_hosts Here's my command: ~ => ssh callydai@callydai.com -vv Here's the output: OpenSSH_6.9p1, LibreSSL 2.1.8 debug1: Reading configuration data /etc/ssh/ssh_config debug1: /etc/ssh/ssh_config line 20: Applying options for * debug1: /etc/ssh/ssh_config line 53: Applying options for * debug2: ssh_connect: needpriv 0 debug1: Connecting to callydai.com [107.180.55.15] port 22. debug1: Connection established. debug1: identity file /Users/raigovind93/.ssh/id_rsa type 1 debug1: key_load_public: No such file or directory debug1: identity file /Users/raigovind93/.ssh/id_rsa-cert type -1 debug1: key_load_public: No such file or directory debug1: identity file /Users/raigovind93/.ssh/id_dsa type -1 debug1: key_load_public: No such file or directory debug1: identity file /Users/raigovind93/.ssh/id_dsa-cert type -1 debug1: key_load_public: No such file or directory debug1: identity file /Users/raigovind93/.ssh/id_ecdsa type -1 debug1: key_load_public: No such file or directory debug1: identity file /Users/raigovind93/.ssh/id_ecdsa-cert type -1 debug1: key_load_public: No such file or directory debug1: identity file /Users/raigovind93/.ssh/id_ed25519 type -1 debug1: key_load_public: No such file or directory debug1: identity file /Users/raigovind93/.ssh/id_ed25519-cert type -1 debug1: Enabling compatibility mode for protocol 2.0 debug1: Local version string SSH-2.0-OpenSSH_6.9 ssh_exchange_identification: read: Connection reset by peer |
When no dhcp server answer, how can I force dhclient to use the static lease from dhclient.conf instead of a previous dhcp lease? Posted: 18 Aug 2021 08:02 AM PDT I have a piece of equipment I would like to default to a specific IP address when no dhcp servers are available. I have set the following static lease in /etc/dhcp/dhclient.conf: timeout 30; lease { interface "eth0"; fixed-address 192.168.1.254; option subnet-mask 255.255.255.0; option routers 127.0.0.1; expire never; } It works, but eth0 will only get this IP when dhclient.eth0.leases and dhclient.leases in /var/lib/dhcp/ are empty. Unless you guys have a good reason to advise against it, I would prefer if the static lease from dhclient.conf was assigned when a dhcp server doesn't reply instead of using old leases. It would make the troubleshooting process easier and allow some way to reach the equipment which is only accessible via ssh and has no display to print out the current ip. I read through the dhclient manual and a lot of google search results but couldn't find a built in way or any suggestions on how to do this. Solutions I thought of: 1-Empty dhclient.leases and set permissions so it can't be modified 2-Link dhclient.leases to /dev/null and set permissions so it can't be modified 3-Same as #1 but instead of setting up the static lease in dhclient.conf, manually add it to dhclient.leases before setting permissions. |
Zip the contents of a folder without including the folder itself Posted: 18 Aug 2021 07:36 AM PDT I have a directory called folder that looks like this: folder -> root_folder -> some files I want to zip this directory into zipped_dir , I tried: zip -r zipped_dir.zip folder/* But this generates a ZIP that looks like this: zipped_dir -> folder -> root_folder -> some files in other words, it's including the directory whose contents I want to zip. How can I exclude this parent directory from the ZIP, without moving anything? IE I would like this end result: zipped_dir -> root_folder -> some files |
CentOS 7 cpupower not setting the CPU's to maximum Posted: 18 Aug 2021 10:08 AM PDT On my machine, i have power savings disable on the BIOS. When I run Ubuntu on this machine, the CPU's are running maximum at 2100 MHz. However, when I'm running CentOS 7, even with the scaling governor set to "performance", the CPU's are not running full at 2100 MHz. cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor performance performance performance performance grep -i mhz /proc/cpuinfo cpu MHz : 1688.285 cpu MHz : 2058.656 cpu MHz : 1622.988 cpu MHz : 2070.632 My application is a network processing application, so the CPU clock difference is resulting a performance difference. I do not have cpuspeed,powerd, or any other power regulating services running. So my question is, is this expected behavior given the cpupower is set to "perform"? It seems CentOS is override the BIOS setting. When I boot to Ubuntu, it just takes the BIOS settings and all the CPU's are running max. |
~ is $HOME, but sometimes? Posted: 18 Aug 2021 10:08 AM PDT cd ~ does the same thing as cd $HOME which is also the same as cd /home/tandu However, cd ~not-tandu changes to /home/not-tandu Is this purely a syntactic choice? How is this handled by the kernel (or the cd execuable?) Is there a special case for ~ to add the slash if everything else is omitted? That is to say, ~/ and ~ change to the same directory, but ~a is one directory up. The same cannot be said for any other directory you change to. |
How to signal the end of stdin input Posted: 18 Aug 2021 09:07 AM PDT - In Bash, I learned that the ending signal can be changed by here document. But by default how can I signal the end of stdin input?
- I happened to find that with cat and chardet, their stdin inputs can be signaled as finished by Ctrl+d. But I seems to remember that Ctrl+d and Ctrl+c are similar to ending execution of a running command. So am I wrong?
|
How to determine Linux kernel architecture? Posted: 18 Aug 2021 08:35 AM PDT uname -m gives i686 and uname -m gives i686 i386 output in Red Hat Enterprise Linux Server release 5.4 (Tikanga) machine. I need to install Oracle Database 10g Release 2 on that machine. So, how can I decide whether kernel architecture is 32bit or 64bit? |
No comments:
Post a Comment