Sunday, October 3, 2021

Recent Questions - Unix & Linux Stack Exchange

Recent Questions - Unix & Linux Stack Exchange


Regex to match on a single instance of a character

Posted: 03 Oct 2021 09:58 AM PDT

I have this thing that I maintain at work, and it has a pretty arcane DSL that it uses. And the tooling for it is not great. To deal with the poor tooling, I've written some scripts to try to find some issues with the code before I send it to production.

The current problem I'm trying to solve has to do with variable names. Variables are named like '@@Variable@@'. If there is only 1 @, or more than 2 @s, then it is a fatal error.

Right now I've got it looping through the files in question, and grepping for @@@ and raising an error when it finds 3 or more consecutive @'s. So that part is cool.

But I'm sort of stuck on the single @. There can be more than one variable on a line.

@@Var1@@ words words words @@Var2@@  #This works  @Var1@@ words words words @@Var2@@   #This will fail because Var1 is wrong.  @@Var1@ words words words @@Var2@@   #This will fail because Var1 is wrong.  @@Var1@@ words words words @Var2@@   #This will fail because Var2 is wrong.  @@Var1@@ words words words @@Var2@   #This will fail because Var2 is wrong.  

There are loads of permutations of the above, and there is no limit to the number of variables on a line.

This awk script works if there is a single variable on any given line, but it doesn't work if there is more than 1 variable on a line.

awk '/@/ && ! /@@.*@@/' test.txt

What I really need to do is match anything where there is only a single instance of @. In the sample code above, it would match on all lines except line 1.

Multiple monitors with xfreerdp and Xvfb

Posted: 03 Oct 2021 08:50 AM PDT

I am trying to start an X server with multiple screens on a single Xvfb like this:

Xvfb :50 -screen 0 1792x1120x24 -screen 1 1792x1120x24  

and start an RDP connection which will use those two screens:

DISPLAY=:50; xfreerdp /w:1792 /h:1120 /monitors:0,1 /multimon /u:... /p... /v:...  

This doesn't work like this, the xfreerdp process crashes. I've tried some combinations of /span and monitor numbers and /multimon:force and nothing worked. When I'm trying the same with one monitor and one Xvfb screen it works. I also don't understand how do I set resolutions per screen/monitor in xfreerdp since I have just one of each /w and /h.

Thanks for any answers or even hints!

No acceptable C compiler found in `$PATH`

Posted: 03 Oct 2021 09:31 AM PDT

Am trying to install gcc, but configure is telling me that

there is no acceptable C compiler found in $PATH.

What can I do?

How to umount a script

Posted: 03 Oct 2021 08:48 AM PDT

Cron periodically has root run a script to backup certain partitions to an external USB drive. The script first removes the oldest backup, then backs up specific partitions and finally writes the result to a backup log file.

I want the drive to unmount when the removal, backup and print finish their work. I had no problem for many years simply with a final line: umount /mnt/backup.

But more recently the umount fails. I understand that I cannot safely do a lazy umount and it seems that option is deprecated. I've tried prefacing the umount command with lines like sleep 10 and cd /. What final lines in the script will cleanly unmount the device for me?

How do I restore the default sources.list file on Debian 11 (bullseye)?

Posted: 03 Oct 2021 08:38 AM PDT

I installed Debian 11 (Bullseye) onto a device with no internet. I used the "firmware CD" version of the ISO. I have configured the network, so I can do ping 8.8.8.8. I tried to run sudo apt update, but I discovered that there weren't any sources in the sources.list file (e.g., it was empty).

I found this question, but it is for Debian Jessie, not Bullseye.

I would also like non-free packages. How can I restore the default repositories, as if I had installed Debian with an internet connection?

FLASK Installation

Posted: 03 Oct 2021 07:50 AM PDT

I was trying to install FLASK(Full-sky Lognormal Astro-fields Simulation Kit) on my ubuntu PC, but I don't quite understand the manual and have been unable to use it.

Whenever I try to run the basic command it says no file or directory found.

Please tell me what I am doing wrong.

The github repository that I am using is github.

And how do I complete the install and try to run it?

Is my firewall configured OK?

Posted: 03 Oct 2021 08:19 AM PDT

enter image description here

$ systemctl status ufw  ● ufw.service - Uncomplicated firewall     Loaded: loaded (/lib/systemd/system/ufw.service; enabled; vendor preset: enabled)     Active: active (exited) since Sun 2021-10-03 15:43:42 +03; 1h 30min ago       Docs: man:ufw(8)   Main PID: 28326 (code=exited, status=0/SUCCESS)      Tasks: 0 (limit: 4467)     CGroup: /system.slice/ufw.service    Oct 03 15:43:39 Cheetah systemd[1]: Starting Uncomplicated firewall...  Oct 03 15:43:42 Cheetah systemd[1]: Started Uncomplicated firewall.  

Why is systemctl status ufw outputting "active (exited)" instead of "active (running)"? Should I be worried?

$ sudo ufw status  Status: active  

How do I disable systemd-controlled daemons running under user 'lp' account?

Posted: 03 Oct 2021 06:55 AM PDT

I see various systemd-controlled daemons running under the lp account Notably, the tracker service is running and trying to index files for the lp account.

$ pstree lp  systemd─┬─(sd-pam)          ├─dbus-daemon          ├─goa-daemon───3*[{goa-daemon}]          ├─goa-identity-se───2*[{goa-identity-se}]          ├─gvfs-afc-volume───3*[{gvfs-afc-volume}]          ├─gvfs-goa-volume───2*[{gvfs-goa-volume}]          ├─gvfs-gphoto2-vo───2*[{gvfs-gphoto2-vo}]          ├─gvfs-mtp-volume───2*[{gvfs-mtp-volume}]          ├─gvfs-udisks2-vo───3*[{gvfs-udisks2-vo}]          ├─gvfsd───2*[{gvfsd}]          ├─gvfsd-fuse───5*[{gvfsd-fuse}]          └─tracker-miner-f───4*[{tracker-miner-f}]  

For example, I see a tracker* service is running under the lp user account, and it's writing tracker database files to /var/spool/lpd/{.cache,.local}.

My question is: Is there a clean way to disable (mask) systemd service units for a specific user account, if that user account is a non-login account?

I'm running Ubuntu 20.04 and systemd 245 (245.4-4ubuntu3.13), in case that's relevant.

When switching to tty, bluetooth headset is being disconnected

Posted: 03 Oct 2021 07:09 AM PDT

I have a bluetooth headset connected to my computer. Whenever I switch to a different tty (virtual terminal), it disconnects and as a result, the audio playback stops. I want this behaviour to change so that I can continue hearing music while working on virtual terminal. How do I do that?

Steps:

  1. in GNOME/Wayland session, have a bluetooth headset connected
  2. start any audio playback (e.g. opening a .mp3 file using totem a.k.a. Videos)
  3. switch to a different tty, e.g. Ctrl+Alt+F3
  4. try to listen to audio

What happens: My headset says "bluetooth disconnected". Audio playback stops. This is independent from the application which plays audio (music players, web browsers, …)

What do I expect to happen: My headset should stay connected. Audio playback should continue.

I'm using Fedora 34 with GNOME/Wayland.

Can't establish communication between two network namespaces using bridge network

Posted: 03 Oct 2021 05:49 AM PDT

I'm following this video about network namespaces in Linux, and trying to practice it myself, but for some reason it doesn't work. What I've done is:

After creating 2 network namespaces named "blue" and "red":

sudo ip link add bridge type bridge  sudo ip link set dev bridge up  sudo ip link add veth-red type veth peer name veth-red-br  sudo ip link add veth-blue type veth peer name veth-blue-br  sudo ip link set veth-red netns red  sudo ip link set veth-red-br master bridge  sudo ip link set veth-blue netns blue  sudo ip link set veth-blue-br master bridge  sudo ip netns exec red ip addr add 192.168.15.1/24 dev veth-red  sudo ip netns exec blue ip addr add 192.168.15.2/24 dev veth-blue  sudo ip netns exec red ip link set veth-red up  sudo ip link set veth-red-br up  sudo ip netns exec blue ip link set veth-blue up  sudo ip link set veth-blue-br up  

Now, if I try to ping from the red to the blue or vice versa, it doesn't work. The weird thing is, that ARP does work, so there is connectivity between the interfaces. I know this because when I run arp in the namespaces I can see the correct values:

$ sudo ip netns exec red arp  Address                  HWtype  HWaddress           Flags Mask            Iface  192.168.15.2             ether   ca:4f:b6:65:a0:f8   C                     veth-red    $ sudo ip netns exec blue ifconfig  veth-blue: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500          inet 192.168.15.2  netmask 255.255.255.0  broadcast 0.0.0.0          inet6 fe80::c84f:b6ff:fe65:a0f8  prefixlen 64  scopeid 0x20<link>          ether ca:4f:b6:65:a0:f8  txqueuelen 1000  (Ethernet)          RX packets 85  bytes 8946 (8.9 KB)          RX errors 0  dropped 0  overruns 0  frame 0          TX packets 27  bytes 1986 (1.9 KB)          TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0    

So you can see that the red namespace, in its ARP table, has the MAC address of the blue namespace's veth, so why then ping doesn't work?

xmlstarlet command for batch processing .xhtml files

Posted: 03 Oct 2021 06:25 AM PDT

I've tried xmlstarlet for processing an individual .xhtml files.

xmlstarlet fo --omit-decl --recover --html file.xhtml   

This command process an individual files and prints output on terminal only. How to batch process multiple files and save results on stdout as a files? (with same name, by adding prefix or suffix for files)

HELP! My DATA is not showing but it exists!

Posted: 03 Oct 2021 06:48 AM PDT

Yesterday, I asked a question on how to stop Linux from asking me to put my sudo password every time I want to write on my second partition (https://askubuntu.com/questions/1366877/stop-asking-for-sudo-on-reading-or-writing-files-on-mnt-my-partition).

I tried to change the owner of the partition using the solution of a user answered my question, but his solution (for some reason) did not work. So I was busy to find another solution and left it as it is. today after rebooting I found that all the data on the partition disappeared! But when I tried to look carefully on the size of the partition, I noticed that it's not empty, it shows that there is 7 GB of data exists on it. But the thing that I don't understand is that I can not see the files.

So I opened a terminal to see what I can find and here is the output: The output from the ls -a command:

sam@sam:/mnt/Data$ ls -a   .   ..  '$RECYCLE.BIN'  'System Volume Information'  

The output from the du command:

sam@sam:/mnt/Data$ du -sh *  64K $RECYCLE.BIN  96K System Volume Information  

The du command shows that those files (which are created by windows, because I have a Windows 10 installed on the same machine) size is in Kilobytes.

But the output from the disks utility shows that there is about 7 GB of data exists on the partition, which is the actual size of the data I had on that partition Yesterday.

Here is a screenshot

Also, Nemo (a file explorer) shows that there is Data on the partition: Here is a screenshot

  • I tried to reboot.
  • I tried to unmount the partition and remount it again.
  • nothing else.

I'm not sure if this output is going to be useful:

sam@sam:/mnt$ pwd  /mnt  sam@sam:/mnt$ ll  total 40  drwxr-xr-x  3 root root  4096 Sep 30 23:29 ./  drwxr-xr-x 23 root root  4096 Sep 30 14:30 ../  drwxr-xr-x  4 root root 32768 Jan  1  1970 Data/  sam@sam:/mnt$  

/mnt/Data: is my second partition which I have my 7 GB data on

Here's the /etc/fstab file output:

sam@sam:/etc$ cat fstab   # /etc/fstab: static file system information.  #  # Use 'blkid' to print the universally unique identifier for a  # device; this may be used with UUID= as a more robust way to name devices  # that works even if disks are added and removed. See fstab(5).  #  # <file system> <mount point>   <type>  <options>       <dump>  <pass>  # / was on /dev/nvme0n1p4 during installation  UUID=b826b1ce-8392-48ff-8b89-0475761cf4e8 /               ext4    errors=remount-ro 0       1  # /boot/efi was on /dev/nvme0n1p1 during installation  UUID=A032-596C  /boot/efi       vfat    umask=0077      0       1  /swapfile                                 none            swap    sw              0       0  LABEL=Data /mnt/Data auto nosuid,nodev,nofail,x-gvfs-show 0 0  sam@sam:/etc$   

I'm using Linux mint

sam@sam:~$ lsb_release -a  No LSB modules are available.  Distributor ID: Linuxmint  Description:    Linux Mint 20  Release:    20  Codename:   ulyana  sam@sam:~$  

If you need other information, feel free to reply in comments.

Important: Please note: the /mnt/Data partition is a FAT partition and NOT an ext4 as I mentioned, my mistake.

find, xarg, Awk Problem

Posted: 03 Oct 2021 08:34 AM PDT

I have the command:

awk 'BEGIN{print "Name, Number"}/value/{print FILENAME, "," $8}' *.txt >> out.csv  

Which works perfectly to go through my txt files in the directory, parse the value(s) and write the final csv file with the header (Name, Number).

My issue is that I have "too many" and so I modify it with find and xarg:

find ./ -maxdepth 1 -type f -name '*.txt' | xargs awk 'BEGIN{print "Name, Number"}/value/{print FILENAME, "," $8}' | sed 's/\.\///g' >> out.csv  

This has worked in the past, but now I find that -- on occasion -- the header is written more than once to the final csv file. I don't know why. It does ssem to be related to the total number of txt files in the directory such that if I hit a certain number, this happens, but I am not really sure.

thanks.

I can't recompile im-chooser in Fedora 34

Posted: 03 Oct 2021 05:52 AM PDT

I have a problem in my Fedora 34 with one package which i can't recompile using rpmbuild --rebuild from Fedora 22 to 34, cause it gave me an error which I can't repair.

eggsmclient-dbus-gnome.c: In function 'sm_client_gdbus_get_interface_info':  eggsmclient-dbus-gnome.c:80:25: error: format not a string literal and no format arguments [-Werror=format-security]   80 |                         g_warning(err->message);      |                         ^~~~~~~~~  eggsmclient-dbus-gnome.c: In function 'sm_client_dbus_gnome_end_session':  eggsmclient-dbus-gnome.c:123:17: error: format not a string literal and no format arguments [-Werror=format-security]  123 |                 g_warning(err->message);      |                 ^~~~~~~~~  eggsmclient-dbus-gnome.c: In function 'egg_sm_client_dbus_gnome_new':  eggsmclient-dbus-gnome.c:163:17: error: format not a string literal and no format arguments [-Werror=format-security]  163 |                 g_warning(err->message);      |                 ^~~~~~~~~  cc1: some warnings being treated as errors  make[2]: *** [Makefile:601: libeggsmclient_la-eggsmclient-dbus-gnome.lo] Error 1  make[2]: *** Waiting for unfinished jobs....  make[2]: Leaving directory '/root/rpmbuild/BUILD/im-chooser-1.6.4/libimchooseui'  make[1]: *** [Makefile:417: all-recursive] Error 1  make[1]: Leaving directory '/root/rpmbuild/BUILD/im-chooser-1.6.4'  make: *** [Makefile:348: all] Error 2  

grep to extract unique capitalized phrases

Posted: 03 Oct 2021 08:16 AM PDT

The snippet below produces a list of all capitalized words from input text:

grep -o '[^ ]*[[:upper:]][^ ]*' book_text.txt > Capitalized_words.txt  

Now I would like to extract and count the occurrences of unique capitalized phrases of any length.

That is, I'd like a tally of unique strings of space-delimited words sharing initial capitals. A given unique phrase would not include punctuation or a non-capitalized word, so "University of British Columbia" would be two phrases, 'University' and 'British Columbia'.

Example Input: "Harvard archaeologists in Mexico also participated in the International School of American Archaeology and Ethnology in Mexico City with scholars from Mexico, Prussia and the United States."

Example Output:

  • 1 - Harvard
  • 1 - International School
  • 1 - American Archaeology
  • 1 - Ethnology
  • 1 - Mexico City
  • 2 - Mexico
  • 1 - Prussia
  • 1 - United States

Note that in the example, 'Mexico' and 'Mexico City' are two different unique phrases sharing one word.

nftables: how to use the same map (or set) in different rules? (dnat & forward)

Posted: 03 Oct 2021 05:54 AM PDT

I am setting up a firewall + NAT using nftables (v0.9.6). The tool provides sets & maps to avoid a lot of rule duplication.

I want to use one common data structure (set or map) to configure both DNAT and filtering rules (forward).

When I try (nft --check -f example.conf), I always get an error. Do you know a way to do this without duplicating the NAT mapping into 2 data structures (one map & one set)?

Here is the example I use (see UPPERCASE COMMENTS).

These are the map & set:

table inet filter {    map mymap {      type inet_service : ipv4_addr      elements = {        12345 : 192.168.0.66,        4321  : 192.168.0.77      }    }      set myset {      type ipv4_addr . inet_service      elements = {        192.168.0.66 . 12345,        192.168.0.77 . 4321      }    }  

And these are the rules:

  chain natprerouting {      type nat hook prerouting priority dstnat; # =-100        # ACCEPTED:      dnat ip to tcp dport map @mymap        # ERROR AT PARSING (unexpected string: @myset):      dnat ip addr . port to @myset    }      chain forward {      type filter hook forward priority filter; # =0        # ERROR AT PARSING (unexpected dport):      ip daddr tcp dport map @mymap accept        # ACCEPTED:      ip daddr . tcp dport @myset accept    }  }  

It would work if dnat to could accept a set. Can I convert a map into a set (or vice versa)? Is there a way?

hostapd on two interfaces (two configuration files)

Posted: 03 Oct 2021 08:59 AM PDT

I have two wireless interfaces and I want to run different APs on each. (Neither hardware supports multiple SSIDs.)

I have a .conf file for each interface. How do I get hostapd to use them both automatically?

This works fine:

# hostapd -dd /etd/hostapd/hostapd.wlan0.conf /etc/hostapd/hostapd.wlan1.conf  

The problem is getting it to work automatically.

One claim is to set in /etc/default/hostapd

DAEMON_CONF="/etc/hostapd/hostapd.wlan0.conf /etc/hostapd/hostapd.wlan1.conf"  

but this doesn't work because the whole string is interpreted as being one file -- which doesn't exist.

I see this is used by /usr/lib/systemd/system/hostapd.service as

ExecStart=/usr/sbin/hostapd -B -P /run/hostapd.pid -B $DAEMON_OPTS ${DAEMON_CONF}  

However, I also see something called /usr/lib/systemd/system/hostapd@.service which does something different:

ExecStart=/usr/sbin/hostapd -B -P /run/hostapd.%i.pid $DAEMON_OPTS /etc/hostapd/%i.conf  

(what does %i mean?) However, systemctl seems only to know about hostapd and not about hostapd@.

Can nftables and iptables/ip6tables rules be applied at the same time? If so: what's the order of precedence?

Posted: 03 Oct 2021 07:01 AM PDT

The question is pretty much already in the title:

Can nftables and iptables/ip6tables rules be applied at the same time? If so: what's the order of precedence?

The reason I ask is this: plenty of tools - especially from the realm of containerization - still rely on iptables and ip6tables to add rules and make containerized services available or unavailable to other entities on the network. So if I want to express my standard firewall rules with nft this has to work in parallel with iptables/ip6tables.

Or is this catered by using iptables-legacy/ip6tables-legacy with update-alternatives or similar? I.e. all those containerization tools continue to use what they assume is iptables/ip6tables, but in reality it's the compatibility "layer" provided by nftables?

As for the order of precedence I'd appreciate a diagram of sorts, if available to show where rules have which precedence.

How do I create a named set of interfaces by name in nftables?

Posted: 03 Oct 2021 06:30 AM PDT

Using sets in nftables is really cool. I am currently using a lot of statements like these in my nftables.conf rulesets:

iifname {clients0, dockernet} oifname wan0 accept \      comment "Allow clients and Docker containers to reach the internet"  

In the rule above {clients0, dockernet} is an anonymous (inline) set of interfaces. Instead of repetition in the rules over and over, I'd like to define a set of interfaces at the top of the file, called a named set in nftables. The manpage (Debian Buster) shows how to do that for several types of sets: ipv4_addr, ipv6_addr, ether_addr, inet_proto, inet_service and mark. However, it seems it's not available for interfaces by name or simple primitive type such as strings.

I've the approach below, but this does not work with the errors given:

  1. Omitting the type:

    table inet filter {    set myset {      elements = {        clients0,        dockernet,                 }    }    [...]  }  

    Result: Error: set definition does not specify key.

  2. Using the string type:

    table inet filter {    type string;    set myset {      elements = {        clients0,        dockernet,                 }    }    [...]  }  

    Result: Error: unqualified key type string specified in set definition.

Is there really no way of naming the anonymous set I've shown on the top?

How to force OS reload of fstab?

Posted: 03 Oct 2021 09:09 AM PDT

'mount -a' works fine as a one-time action. But auto-mount of removable media reverts to settings that were in fstab at the last reboot.

How to make the OS actually reload fstab so auto-mounts use the new settings when media is connected?

Specific example seen with Raspbian (Debian) Stretch:

  • FAT-formatted SD card; configured fstab to auto-mount; rebooted; volume auto-mounts, but RO

  • Changed umask options in fstab; mount -a while media is connected, and volume is now RW

  • Unmount and re-insert the media; auto-mount works, but using the options in fstab from the last reboot, so volume is RO

  • Reboot; OS loads updated fstab; auto-mount works when media is connected, and volume is RW - how to get this effect without a reboot?

FWIW, the (updated) fstab syntax was:

/dev/sdb1   /Volumes/boot   vfat    rw,user,exec,nofail,umask=0000  0   0  

How to match both UDP and TCP for given ports in one line with nftables

Posted: 03 Oct 2021 06:07 AM PDT

How can i do this in a single line?

tcp dport 53 counter accept comment "accept DNS"  udp dport 53 counter accept comment "accept DNS"  

wifi not working, lenovo G50-70

Posted: 03 Oct 2021 09:06 AM PDT

I have just installed UBUNTU 16.04 LTS/

I have problem with Wifi.

I can't enable wifi in my laptop. I have lenovo G50-70.

iwconfig  enp1s0    no wireless extensions.  lo        no wireless extensions.  

The output for sudo lshw -C network is:

*-network  UNCLAIMED  

network-manager is already the newest version (1.2.6-0ubuntu0.16.04.2).

It's showing me only bluetooth and nothing about wireless.

rfkill list all  1: hci0: Bluetooth      Soft blocked: no      Hard blocked: no  

I have Windows 8.1 on this computer too and wifi is working properly.

lspci -nn  00:00.0 Host bridge [0600]: Intel Corporation Haswell-ULT DRAM Controller [8086:0a04] (rev 0b)  00:02.0 VGA compatible controller [0300]: Intel Corporation Haswell-ULT Integrated Graphics Controller [8086:0a16] (rev 0b)  00:03.0 Audio device [0403]: Intel Corporation Haswell-ULT HD Audio Controller [8086:0a0c] (rev 0b)  00:14.0 USB controller [0c03]: Intel Corporation 8 Series USB xHCI HC [8086:9c31] (rev 04)  00:16.0 Communication controller [0780]: Intel Corporation 8 Series HECI #0 [8086:9c3a] (rev 04)  00:1b.0 Audio device [0403]: Intel Corporation 8 Series HD Audio Controller [8086:9c20] (rev 04)  00:1c.0 PCI bridge [0604]: Intel Corporation 8 Series PCI Express Root Port 3 [8086:9c14] (rev e4)  00:1c.3 PCI bridge [0604]: Intel Corporation 8 Series PCI Express Root Port 4 [8086:9c16] (rev e4)  00:1d.0 USB controller [0c03]: Intel Corporation 8 Series USB EHCI #1 [8086:9c26] (rev 04)  00:1f.0 ISA bridge [0601]: Intel Corporation 8 Series LPC Controller [8086:9c43] (rev 04)  00:1f.2 SATA controller [0106]: Intel Corporation 8 Series SATA Controller 1 [AHCI mode] [8086:9c03] (rev 04)  00:1f.3 SMBus [0c05]: Intel Corporation 8 Series SMBus Controller [8086:9c22] (rev 04)  01:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [10ec:8168] (rev 10)  02:00.0 Network controller [0280]: Broadcom Corporation BCM43142 802.11b/g/n [14e4:4365] (rev 01)`  
lspci | grep -i wireless  

I don't get any respond.

lspci  01:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 10)  02:00.0 Network controller: Broadcom Corporation BCM43142 802.11b/g/n (rev 01)  

Vendor's name:

product: BCM43142 802.11b/g/n  vendor: Broadcom Corporation  

I found: Broadcom BCM43142 Wireless LAN Driver (802.11b/g/n) for Windows 7 (32-bit, 64-bit) - Notebook

https://support.lenovo.com/pl/en/downloads/DS033286

What is paging space in AIX?

Posted: 03 Oct 2021 08:05 AM PDT

I get that Paging Space in AIX is actually like SWAP in Linux. In one of my AIX servers at work, i'm actually seeing 99.7% Physical memory being utilized when my application is running(handling quite some data). Most of the time Server is utilizing 95% of Physical memory(RAM). From the pic attached, we can see Paging Space is being utilized. And i believe my Application can run little faster if i upgrade RAM.

But i am not able to convince the management. They say that still Paging Space is there and until it's utilized fully, no need to upgrade RAM.

enter image description here

Isn't paging Space actually in Hard Disk ?

OS actually transfer data between Paging Space(Hard Disk) & RAM back & forth in case of High Memory Utilization ?

Can someone please shed light that if i am using up 99.7% of Physical Memory - RAM in Server,it's a Good reason to upgrade RAM ?

Note: I'm posting here as a last resort and in need of proof to convince my management to upgrade the RAM in my server before Christmas, as i will be seeing quite a lot of data during Christmas. So Please, before down-voting, at least help me what's wrong with my question and help me get an answer.

How to OCR a PDF file and get the text stored within the PDF?

Posted: 03 Oct 2021 07:30 AM PDT

First, apologies if this has been asked before - I searched for a while through the existing posts, but could not find support.

I am interested in a solution for Fedora to OCR a multipage non-searchable PDF and to turn this PDF into a new PDF file that contains the text layer on top of the image. On Mac OSX or Windows we could use Adobe Acrobat, but is there a solution on Linux, specifically on Fedora?

This seems to describe a solution - but unfortunately I am already lost when retrieving exact-image.

Is there any way of changing most keybindings to something more familiar?

Posted: 03 Oct 2021 08:28 AM PDT

most pager is nice, but its default keybindings are unlike any other.

As I don't want to learn a whole new set of keybindings for my pager (no matter how fancy and wonderful it is), is there any way of making most hotkeys feel more like vi, less and others?

Disable touchpad while typing and also touchpad click for X session

Posted: 03 Oct 2021 06:05 AM PDT

I have done a lot of googling for disable touchpad click and disable touchpad while typing and found a lot of answers. However most of them are related to a desktop enviornment. I do not use a DE.

So, I need to:

  • Completely disable touchpad clicks always

and

  • Disable touchpad while typing (like scrolling, moving mouse)

Debian 8 apt-get upgrade fails with Failed to fetch … Connection failed

Posted: 03 Oct 2021 07:01 AM PDT

Debian 8 "Jessie". CLI-only home-use server.

"apt-get upgrade" always fails with "E: Failed to fetch ... Connection failed ..." errors.

"apt-get update" appears to always succeed.

Problem has been occurring for days. Upgrades were previously succeeding without issue. Recently re-sized the /home and /var drive partitions but cannot think of any other major changes.

Have attempted to include several mirrors in /etc/apt/sources.list but none succeed. My sources.list file is:

deb http://mirror.it.ubc.ca/debian jessie main  deb http://mirror.its.dal.ca/debian jessie main  deb http://debian.mirror.iweb.ca/debian jessie main  deb http://debian.mirror.rafal.ca/debian jessie main  deb http://ftp3.nrc.ca/debian jessie main    deb-src http://mirror.it.ubc.ca/debian jessie main  deb-src http://mirror.its.dal.ca/debian jessie main  deb-src http://debian.mirror.iweb.ca/debian jessie main  deb-src http://debian.mirror.rafal.ca/debian jessie main  deb-src http://ftp3.nrc.ca/debian jessie main    deb http://mirror.it.ubc.ca/debian jessie-updates main  deb http://mirror.its.dal.ca/debian jessie-updates main  deb http://debian.mirror.iweb.ca/debian jessie-updates main  deb http://debian.mirror.rafal.ca/debian jessie-updates main  deb http://ftp3.nrc.ca/debian jessie-updates main    deb-src http://mirror.it.ubc.ca/debian jessie-updates main  deb-src http://mirror.its.dal.ca/debian jessie-updates main  deb-src http://debian.mirror.iweb.ca/debian jessie-updates main  deb-src http://debian.mirror.rafal.ca/debian jessie-updates main  deb-src http://ftp3.nrc.ca/debian jessie-updates main  

Example of errors encountered:

Err http://mirror.its.dal.ca/debian/ jessie/main base-files amd64 8+deb8u2    Connection failed [IP: 192.75.96.254 80]    E: Failed to fetch http://ftp3.nrc.ca/debian/pool/main/b/base-files/base-files_8+deb8u2_amd64.deb  Connection failed [IP: 132.246.2.23 80]  

No proxy is defined in /etc/apt/apt.conf or /etc/apt/apt.conf.d

Attempting to download the failed URLs on a different, desktop computer through a web browser also fail with connection errors.

Perhaps related, attempting to download netinstall images with a desktop web browser from cdimage.debian.org always fail with a "The connection was reset" error.

My Arch Linux desktop computer can upgrade packages fine.

How to recursively find the amount stored in directory?

Posted: 03 Oct 2021 05:42 AM PDT

I know you are able to see the byte size of a file when you do a long listing with ll or ls -l. But I want to know how much storage is in a directory including the files within that directory and the subdirectories within there, etc. I don't want the number of files, but instead the amount of storage those files take up.

So I want to know how much storage is in a certain directory recursively? I'm guessing, if there is a command, that it would be in bytes.

No comments:

Post a Comment