Thursday, July 15, 2021

Recent Questions - Unix & Linux Stack Exchange

Recent Questions - Unix & Linux Stack Exchange


Can't change Qt version from 5.12.8 to 5.15.X

Posted: 15 Jul 2021 10:48 AM PDT

I've tried building packages from qt's website but everytime I try to cmake a specific file that requests qt version 5.15 I'm always told it fails because I'm using the default version 5.12.8. How can I make it so I'm using a new version of qt? APT packages don't seem to solve the issue.

I'm attempting to cmake some libs from the kde api repo because I can't find them on my computer and this issue is preventing that. I would like to finish building that kdeconnect app via vscode.

ldd shows libstdc++ not found but for clang its available, how is this possible?

Posted: 15 Jul 2021 10:55 AM PDT

I run fedora 34, how is this possible (ldd shows libstdc++ not found but for clang its available): enter image description here

Output of 2 commands get the difference (ls vs du)

Posted: 15 Jul 2021 09:59 AM PDT

So analyzing an issue at work I found that, when I created some datafiles on Oracle, the datafiles didn't reserve the space in the Filesystem, so I went to the sapdata filesystem where I put the datafiles and for my surprise an ls -ltr show the file with the specified weight when I created the datafile, but a du -gs say it was 0.00 so to compare I made this two commands:

A)

find ./sapdata* -name "temp*" -type f -exec du -gs {} \;  

B)

find ./sapdata* -name "temp*" -type f -exec ls -ltr {} \; | awk '{printf ("%.2f\t%s\n", $5/1024/1024/1024,$9)}'  

The last one result on an output that is equal to the output of the first one, but the second one using the information from ls -ltr.

In practice it's everything ok, I manage to see the difference and we are looking at the issue, but I want to go a step forward in two ways: 1.- Mix both results into something that tells me which files are different in one line 2.- Mix both results and get a "Health status" of the comparisons, this would be useful to make a monitoring script.

The output I get from this commands are the following for an example

A) Gives me:

15.63   ./sapdata19/temp_1/temp.data1  25.31   ./sapdata20/temp_2/temp.data2  

B) Gives me:

15.63   ./sapdata19/temp_1/temp.data1  0.00    ./sapdata20/temp_2/temp.data2  

So from solution 1 I would want something like

                         DU                                            DIFF                                    LS  --------------------------------------------------------   ----------   --------------------------------------------------------  15.63   ./sapdata19/temp_1/temp.data1    OK          15.63   ./sapdata19/temp_1/temp.data1  25.31   ./sapdata20/temp_2/temp.data2    FAILED   0.00    ./sapdata20/temp_2/temp.data2  

Or something similar, the headers are not needed although I know it's possible

For solution 2 I would want something like

Health=50%  Number of Failed=1  Total Number of Datafiles=2  List of Failed=  ./sapdata20/temp_2/temp.data2  

Maybe the last solution I can do it without much issues with a Bash script, but the first one since I want it in one line I'm not sure how to do it. I guess with xargs and diff or maybe a for inside awk but I'm not sure.

Regards!

Keyboard and trackpad problems in Opensuse Tumbleweed 15

Posted: 15 Jul 2021 09:41 AM PDT

Recently I installed OpenSuse tumbleweed 15 on my 2015 MacBook 8,1 retina model, and both the keyboard and trackpad are not working (only externally connected ones). I'm not that experienced with these configurations, so any help would be appreciated. I saw a fix for a similar situation on Ubuntu, but said fix would not work on OpenSuse.

How to solve error AR_DIAG_SW ath9k in Ubuntu 18.04

Posted: 15 Jul 2021 09:00 AM PDT

I'm trying to install the firmware of an ath9k Wifi Card in a Jetson Nano based on Ubuntu 19.04. However, I couldn't installed it properly, so far.

When I execute the command dmesg I get this error:

[12721.012786] ath: phy0: DMA failed to stop in 10 ms AR_CR=0x00000024 AR_DIAG_SW=0x42000020 DMADBG_7=0x00008040  

Another outputs are:

lspci | grep -i net

01:00.0 Network controller: Qualcomm Atheros AR928X Wireless Network Adapter (PCI-Express) (rev 01)  

lsmod | grep ath9k

ath9k                 151289  0  ath9k_common           28403  1 ath9k  ath9k_hw              453422  2 ath9k,ath9k_common  ath                    23685  3 ath9k_hw,ath9k,ath9k_common  mac80211              721935  1 ath9k  cfg80211              589932  4 mac80211,ath9k,ath,ath9k_common  

sudo lspci -vv -s 01:00.0 | grep -i 'kernel'

Kernel driver in use: ath9k  Kernel modules: ath9k  

sudo ethtool -i wlan0

driver: ath9k  version: 4.9.201-tegra  firmware-version: N/A  expansion-rom-version:  bus-info: 0000:01:00.0  supports-statistics: yes  supports-test: no  supports-eeprom-access: no  supports-register-dump: no  supports-priv-flags: no  

sudo nmcli dev wifi

IN-USE  SSID  MODE  CHAN  RATE  SIGNAL  BARS  SECURITY  

sudo iwconfig wlan0

wlan0     IEEE 802.11  ESSID:off/any              Mode:Managed  Access Point: Not-Associated   Tx-Power=3 dBm               Retry short limit:7   RTS thr:off   Fragment thr:off            Encryption key:off            Power Management:off  

As shown above, there is no firmware (NA) and no wireless networks are discovered. Someone can help me with this issue? Thanks

bash script to fill in .xml with different values

Posted: 15 Jul 2021 08:54 AM PDT

my xml will be something like this. in the sections labeled <File> I want to be able to pull from a directory and add cad files, maybe 15 to 20. Currently it needs to be done manually adding each line for 1 cad file. It also must have the entire sequence that surrounds it from <Part> to </Part> I would like to pull from a directory and populate the xml with each file name all of the rest of the xml will remain as is. I have not begun a script at this point. Thanks

<?xml version="1.0" encoding="utf-8"?>  <Program version="1.2">      <Input>          <Name>Demo</Name>      </Input>      <Parts>          <Part>              <Input>                  <File>C:\AutoPol\DXF FILES\HeBo 4585.SLDPRT</File>                  <Material>Mild Steel</Material>                  <Machine>AutoPOL</Machine>                  <SaveSettings>                      <NCFile>                      <Save>true</Save>                      <Directory>C:\AutoPol\OUTPUT\NC FILES</Directory>                      <File>test1</File>                      </NCFile>                      <Graphics>                          <Save>true</Save>                          <Directory>C:\AutoPol\OUTPUT\NC FILES</Directory>                          <File>Part1</File>                      </Graphics>                      <FlatPatternDXF>                          <Save>true</Save>                          <Directory>C:\AutoPol\OUTPUT\DXF FILES</Directory>                          <DXFSetting>AutoPOL</DXFSetting>                           <File>Part1</File>                      </FlatPatternDXF>                      <AutoPOLFile>                          <Save>true</Save>                          <Directory>C:\AutoPol\OUTPUT\POLP FILES</Directory>                          <File>Part1</File>                      </AutoPOLFile>                      <ProcessDocumentation>                          <Save>true</Save>                          <Directory>C:\AutoPol\OUTPUT\PDF FILES</Directory>                          <File>Part1</File>                      </ProcessDocumentation>                  </SaveSettings>              </Input>          </Part>          <Part>              <Input>                  <File>C:\AutoPol\DXF FILES\4_2-1.igs</File>                  <Material>Mild Steel</Material>                  <Machine>AutoPOL</Machine>                  <SaveSettings>                      <NCFile>                      <Save>true</Save>                      <Directory>C:\AutoPol\OUTPUT\NC FILES</Directory>                      <File>test2</File>                      </NCFile>                      <Graphics>                          <Save>true</Save>                          <Directory>C:\AutoPol\OUTPUT\NC FILES</Directory>                          <File>Part2</File>                      </Graphics>                      <FlatPatternDXF>                          <Save>true</Save>                          <Directory>C:\AutoPol\OUTPUT\DXF FILES</Directory>                          <DXFSetting>AutoPOL</DXFSetting>                           <File>Part2</File>                      </FlatPatternDXF>                      <AutoPOLFile>                          <Save>true</Save>                          <Directory>C:\AutoPol\OUTPUT\POLP FILES</Directory>                          <File>Part2</File>                      </AutoPOLFile>                      <ProcessDocumentation>                          <Save>true</Save>                          <Directory>C:\AutoPol\OUTPUT\PDF FILES</Directory>                          <File>Part2</File>                      </ProcessDocumentation>                  </SaveSettings>              </Input>          </Part>          <Part>              <Input>                  <File>C:\AutoPol\DXF FILES\KC900.igs</File>                  <Material>Mild Steel</Material>                  <Machine>AutoPOL</Machine>                  <SaveSettings>                      <NCFile>                      <Save>true</Save>                      <Directory>C:\AutoPol\OUTPUT\NC FILES</Directory>                      <File>test3</File>                      </NCFile>                      <Graphics>                          <Save>true</Save>                          <Directory>C:\AutoPol\OUTPUT\NC FILES</Directory>                          <File>Part3</File>                      </Graphics>                      <FlatPatternDXF>                          <Save>true</Save>                          <Directory>C:\AutoPol\OUTPUT\DXF FILES</Directory>                          <DXFSetting>AutoPOL</DXFSetting>                           <File>Part3</File>                      </FlatPatternDXF>                      <AutoPOLFile>                          <Save>true</Save>                          <Directory>C:\AutoPol\OUTPUT\POLP FILES</Directory>                          <File>Part3</File>                      </AutoPOLFile>                      <ProcessDocumentation>                          <Save>true</Save>                          <Directory>C:\AutoPol\OUTPUT\PDF FILES</Directory>                          <File>Part3</File>                      </ProcessDocumentation>                  </SaveSettings>              </Input>          </Part>          <Part>              <Input>                  <File>C:\AutoPol\DXF FILES\MetalSheet_Pusher.step</File>                  <Material>Mild Steel</Material>                  <Machine>AutoPOL</Machine>                  <SaveSettings>                      <NCFile>                      <Save>true</Save>                      <Directory>C:\AutoPol\OUTPUT\NC FILES</Directory>                      <File>test4</File>                      </NCFile>                      <Graphics>                          <Save>true</Save>                          <Directory>C:\AutoPol\OUTPUT\NC FILES</Directory>                          <File>Part4</File>                      </Graphics>                      <FlatPatternDXF>                          <Save>true</Save>                          <Directory>C:\AutoPol\OUTPUT\DXF FILES</Directory>                          <DXFSetting>AutoPOL</DXFSetting>                           <File>Part4</File>                      </FlatPatternDXF>                      <AutoPOLFile>                          <Save>true</Save>                          <Directory>C:\AutoPol\OUTPUT\POLP FILES</Directory>                          <File>Part4</File>                      </AutoPOLFile>                      <ProcessDocumentation>                          <Save>true</Save>                          <Directory>C:\AutoPol\OUTPUT\PDF FILES</Directory>                          <File>Part4</File>                      </ProcessDocumentation>                  </SaveSettings>              </Input>          </Part>      </Parts>  </Program>  

Ubuntu 20.04 not detecting external monitor anymore

Posted: 15 Jul 2021 08:40 AM PDT

It would be great if someone can help me. I was using the two external monitors plugged into ThinkPad-T14s-Gen-1 that has installed only Ubuntu 20.04, the laptop has AMD Ryzen 7 pro 4750u with AMD integrated graphics. One monitor was plugged into HDMI and other one into USB C socket, the laptop has two USB C sockets, one can be used both for charging and display, other one only for data. Everything was working fine but, both of monitors were detected but after some updates, after I did some updates(apt get update and upgrade) from 20.04 to 20.04.1 and 20.04.02, one day it suddenly is not detecting the one monitor plugged into USB C socket, its not even working after unplugging and plugging it back in(before it would work if I unplug and plug it back) The cable USB is good, its new and I have bought another one USB to check but they both dont work so its not about cables, it must be software issue. However I suspect the reason why the monitor stopped responding is because once I had accidentally clicked suspend option when I wanted to shutdown the pc. When I logged back in one monitor was not detected anymore. I am sharing my output of xrandr on terminal, btw I am absolute beginner to Linux. I have unplugged the monitor from HDMI, since its working but I plugged in the other one into USB C but its not detecting, its only detecting the laptop display(eDP):

Screen 0: minimum 320 x 200, current 1920 x 1080, maximum 16384 x 16384 eDP connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 309mm x 173mm 1920x1080 60.00*+ 1680x1050 60.00 1280x1024 60.00 1440x900 60.00 1280x800 60.00 1280x720 60.00 1024x768 60.00 800x600 60.00 640x480 60.00 HDMI-A-0 disconnected (normal left inverted right x axis y axis) DisplayPort-0 disconnected (normal left inverted right x axis y axis) DisplayPort-1 disconnected (normal left inverted right x axis y axis)

How to create custom keyboard shortcuts in Gnome with wayland?

Posted: 15 Jul 2021 08:29 AM PDT

My main target: bind Alt+Arrow Left/Right as Home/End buttons.

I have tried to create shortcuts with default gnome shortcut adder via settings, but with this approach you can only bind shortcut to execute command and it's the main problem(wayland can't emulate keyboard presses via command)

What can I do?

Arch Linux stuck at boot

Posted: 15 Jul 2021 08:28 AM PDT

Arch Linux (Inside EFI hyper-v VM on windows 10) returns Clean: /dev/sdx...

so I went to grub and removed quiet Now it stops at [OK] Finished Load/Save Random Seed. Here is an Image showing output. Arch Hyper-V window

This occurred after trying to install KDE with these commands:

pacman -S xorg plasma plasma-wayland-session kde-applications   systemctl enable sddm.service  systemctl enable NetworkManager.service  reboot  

when I press ctrl + alt + F2 it shows me tty however when I try to start the DE it just gives me stuff like command not found if you need any more info I am glad to give it.

Repeat flags with different values in same command

Posted: 15 Jul 2021 09:09 AM PDT

I will try to keep it simple. I have a result from editing stream as follows using sed command:

filename_1    filename_2    .    .    filename_n    

Now depending upon the number of files in the previous result I want to execute the command in shell as follows.

some_command --foo "filname_1" --foo "filename_2" --foo "filename_n" remaining_some_command  

Where --foo is flag in between the command and filename_1...filename_n are its values depending on the result from sed .

It should be possible in shell. But how?

Set console resolution on armbian buster / NanoPI M4

Posted: 15 Jul 2021 08:25 AM PDT

I have a NanoPI M4 hooked up to a Uniroi 1024x600px HDMI screen running Armbian Buster 5.10.43-rockchip64 booting to a console (no X).

My issue is, that the console resolution is set to 1024x768px after boot which makes the screen almost unreadable.

Can I somehow fix the console resolution to 1024x600 on my machine (e.g. by setting some values in armbianEnv.txt or similar)?

ssh-keygen -t rsa1 is failing

Posted: 15 Jul 2021 08:16 AM PDT

On Ubuntu 18.04

ssh-keygen -t rsa1 is failing with: unknown key type rsa1.

However when typing ssh-keygen -t rsa auto-complete gives me two options:

$ ssh-keygen -t rsa  rsa   rsa1   

How can I generate an rsa1 key?

File layout for file

Posted: 15 Jul 2021 09:54 AM PDT

I have a file with numbers in like this:

1234  5678  3456  

How can I get this on one line using a bash shell script with a space between each like this

1234 5678 3456  

UTF-8 characters are not printed correctly on the console

Posted: 15 Jul 2021 09:16 AM PDT

I've seen some questions similar to this one but I'm not being able to use the solutions of those to help me. So, what is my problem?, I have a file with the characters ç, ã, à, etc... but they don't print on the terminal when I use either awk, cat, grep, etc... The terminal and my font can and do support these characters.

My locale is set to en_GB.UTF-8 and the output of the command locale is:

LANG=en_GB.UTF-8  LC_CTYPE="en_GB.UTF-8"  LC_NUMERIC="en_GB.UTF-8"  LC_TIME="en_GB.UTF-8"  LC_COLLATE="en_GB.UTF-8"  LC_MONETARY="en_GB.UTF-8"  LC_MESSAGES="en_GB.UTF-8"  LC_PAPER="en_GB.UTF-8"  LC_NAME="en_GB.UTF-8"  LC_ADDRESS="en_GB.UTF-8"  LC_TELEPHONE="en_GB.UTF-8"  LC_MEASUREMENT="en_GB.UTF-8"  LC_IDENTIFICATION="en_GB.UTF-8"  LC_ALL=en_GB.UTF-8  

Is there a comprehensive list of all the ways to view a file's contents in linux?

Posted: 15 Jul 2021 08:51 AM PDT

Is there a comprehensive list of all the ways to view a file's contents in linux, including both methods like cat as well as methods like whiptail where it isn't the reason it was created for?

I know of cat, whiptail, nano, head, nl and tail. I'm sure there must be over 100. Could someone please provide a comprehensive list of them?

How can I identify what process is sending emails?

Posted: 15 Jul 2021 08:39 AM PDT

My email service provider has informed me that I keep hitting my daily SMTP quota limit and has identified one of my servers as sending email from a root account.

I've disabled any cronjobs that were sending emails and then checked my mail logs and syslog and can see the mail process they're referring to is still running each minute.

However, it's not running from the cron, and appears to be a standalone SMTP process.

tail -f ./var/log/syslog  Jul 15 09:25:02 serveralias sSMTP[1359056]: Creating SSL connection to host  Jul 15 09:25:03 serveralias sSMTP[1359056]: SSL connection using ECDHE_RSA_AES_256_GCM_SHA384  Jul 15 09:25:06 serveralias sSMTP[1359056]: Sent mail for root@serveralias.com (221 2.0.0 Bye) uid=1000 username=not-root-account outbytes=1332  Jul 15 09:26:01 serveralias sSMTP[1359129]: Creating SSL connection to host  Jul 15 09:26:03 serveralias sSMTP[1359129]: SSL connection using ECDHE_RSA_AES_256_GCM_SHA384  Jul 15 09:26:05 serveralias sSMTP[1359129]: Sent mail for root@serveralias.com (221 2.0.0 Bye) uid=1000 username=not-root-account outbytes=1332  

Is there a way I can identify this process and see what it's doing? OS is Ubuntu Server 20.04

how to use quantifiers in sed substitution expression?

Posted: 15 Jul 2021 09:13 AM PDT

I'm using | sed to indent the result of some command (let's take a plain $ echo something for this example). I want to prefix the result with say 10 spaces. The following works fine :

$ echo something | sed 's/^/         /g'           something  

But isn't there a way to use quantifiers in the | sed expression ? I tried for example

$ echo something | sed 's/^/ {10}/g'   {10}something  

but obviously it doesn't work, {10} isn't interpreted as a quantifier. And protecting the braces with backslashes doesn't work either :

$ echo something | sed 's/^/ \{10\}/g'   {10}something  

Is there a way to use quantifiers in the substitution expression ?

IP forwarding, masquareding, NAT

Posted: 15 Jul 2021 09:36 AM PDT

I have one physical interface eth0 on my target, running Linux. The IP address of this interface is 172.16.81.x (public IP).

I have to create a virtual interface eth0:1 with IP address 173.1.1.x. I will be running socket server with custom port 49155 using IP address 173.1.1.x.

From another PC/target I should not be able to ping 173.1.1.x. However, from another PC I will be running a socket client program. This client should be able to connect to port 49155 on the 172.16.81.x public IP.

I have tried NAT, bridge but not successful.

with below iptable rules, was able to establish server<-->client communication:

echo 1 | sudo tee /proc/sys/net/ipv4/ip_forward  sudo iptables -A FORWARD -i ens33 -o 173.1.1.6 -p tcp --syn --dport 49155 -m conntrack --ctstate NEW -j ACCEPT  sudo iptables -A FORWARD -i ens33 -o 173.1.1.6 -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT  sudo iptables -A FORWARD -i ens33 -o 173.1.1.6 -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT  sudo iptables -t nat -A PREROUTING -i ens33 -p tcp --dport 49155 -j DNAT --to-destination 173.1.1.6  sudo iptables -t nat -A POSTROUTING -o ens33 -p tcp --dport 49155 -d 173.1.1.6 -j SNAT --to-source 192.168.233.251  sudo iptables -A INPUT -m tcp -p tcp -s 192.168.233.251 --dport 49155 -j ACCEPT  

at this point still 173.1.1.6 is pingable from outside PC.

however i have to also make 173.1.1.6 invisible for external world for that i add below rules:

sudo iptables -A INPUT -d 173.1.1.6 -j DROP  sudo iptables -A OUTPUT -s 173.1.1.6 -j DROP  sudo iptables -A FORWARD -s 173.1.1.6 -j DROP  

after this ping is blocked. server <--> client communication also doesnt happen.

How to temporarily hide an icon on XFce4's panel?

Posted: 15 Jul 2021 08:25 AM PDT

I have an icon on the panel that I'd like to hide, but only temporarily, i.e. my mail check icon. There are times I'd like to hide it, so I can focus on work, ignoring E-mails until later.

Removing the icon results in the settings being deleted, which is not a good solution, as re-adding the icon then takes many steps.

How can I temporarily hide an icon in XFce4?

Break down string into array in shell script

Posted: 15 Jul 2021 10:17 AM PDT

I am trying to convert string for example string=11111001 to array which I will be able to access by calling respective array index like

arr[0]=1, arr[1]=0  

I am new to shell scripting and from what I read, it doesn't have a separator I am stuck.

Can someone help me?

Freeradius proxy EAP request to non-EAP server

Posted: 15 Jul 2021 09:47 AM PDT

We have Keycloak SSO with the Radius plugin, which doesn't support EAP. We want to authenticate the WPA-2 Enterprise Ubiquiti network against our SSO, but it requires the support of EAP.

It is possible to use FreeRadius to terminate EAP, proxy to SSO Radius server, and then convert the answer back to EAP? If yes, how it can be achieved?

We have tried to apply several configurations available on the net, but no one of them converts to non-EAP request - our SSO Radius server still receives EAP request.

Thank you

Installing a list of packages from an URL

Posted: 15 Jul 2021 09:04 AM PDT

I'm trying to install a new version of RabbitMQ on my Raspberry Pi 3, running a new raspbian image (based on debian 9).

I was following the installation guide for Debian/Ubuntu, which worked for me on Ubuntu 18.04, but not on raspbian: https://www.rabbitmq.com/install-debian.html

Whatever I tried to do according to the guide to force the use of their own repository (creating /etc/apt/sources.list.d/bintray.erlang.list and /etc/apt/preferences.d/erlang), when I do apt-get install erlang-nox I get a version 19.2.1 from another repository. This version does not work with newer rabbitmq-server releases, and has security holes too.

So now instead, I want to manually install the erlang-nox packages, found here on the rabbitmq repository: http://dl.bintray.com/rabbitmq/debian/pool/erlang/21.0.5-1/debian/stretch/

How could I download the packages and install them all at once? Do I have to copy paste the name of all of these?

Edit: I noticed there is a erlang_21.0.5-1_all.deb package at the bottom of the list, tried to download it and install it, but as it turns out it does not contain all the packages at all, it is only 36 KB.

How to get whole command line from a process?

Posted: 15 Jul 2021 08:21 AM PDT

How can I get the command arguments or the whole command line from a running process using its process name?

For example this process:

# ps  PID   USER     TIME   COMMAND   1452 root       0:00 /sbin/udhcpc -b -T 1 -A 12 -i eth0 -p /var/run/udhcpc.eth0.pid  

And what I want is /sbin/udhcpc -b -T 1 -A 12 -i eth0 -p /var/run/udhcpc.eth0.pid or the arguments. I know the process name and want its arguments. I'm using Busybox on SliTaz.

Disabling gpgcheck with tmprepo plugin

Posted: 15 Jul 2021 10:00 AM PDT

I want to install an rpm from a repo just once and not have to add it to my yum.repos.d/ directory using the tmprepo plugin. However, I'm blocked on how to install an rpm with no gpg signature. The '—nogpgcheck' option doesn't work with the tmprepo plugin and I need to manually append 'pkgs_gpgcheck=false' to /etc/yum/pluginconf.d/tmprepo.conf.

sudo yum --tmprepo=http://edge.artifactory.example.com:8000/artifactory/chef_rpms/rhel/chef_rpms.repo --nogpgcheck  install chef    ## ^^ this fails as —nogpgcheck doesn't work with tmprepo which defaults to gpgcheck unless I manually edit /etc/yum/pluginconf.d/tmprepo.conf  

Any way this can be done when calling yum on command line? I don't want to go about changing a file on the system for a one-time thing. Thanks!

  • Faheem

Parse XML to get node value in bash script?

Posted: 15 Jul 2021 10:32 AM PDT

I would like to know how I can get the value of a node with the following paths:

config/global/resources/default_setup/connection/host  config/global/resources/default_setup/connection/username  config/global/resources/default_setup/connection/password  config/global/resources/default_setup/connection/dbname  

from the following XML:

<?xml version="1.0"?>  <config>      <global>          <install>              <date><![CDATA[Tue, 11 Dec 2012 12:31:25 +0000]]></date>          </install>          <crypt>              <key><![CDATA[70e75d7969b900b696785f2f81ecb430]]></key>          </crypt>          <disable_local_modules>false</disable_local_modules>          <resources>              <db>                  <table_prefix><![CDATA[]]></table_prefix>              </db>              <default_setup>                  <connection>                      <host><![CDATA[localhost]]></host>                      <username><![CDATA[root]]></username>                      <password><![CDATA[pass123]]></password>                      <dbname><![CDATA[testdb]]></dbname>                      <initStatements><![CDATA[SET NAMES utf8]]></initStatements>                      <model><![CDATA[mysql4]]></model>                      <type><![CDATA[pdo_mysql]]></type>                      <pdoType><![CDATA[]]></pdoType>                      <active>1</active>                  </connection>              </default_setup>          </resources>          <session_save><![CDATA[files]]></session_save>      </global>      <admin>          <routers>              <adminhtml>                  <args>                      <frontName><![CDATA[admin]]></frontName>                  </args>              </adminhtml>          </routers>      </admin>  </config>  

Also I want to assign that value to the variable for further use. Let me know your idea.

rm -rf all files and all hidden files without . & .. error

Posted: 15 Jul 2021 08:06 AM PDT

rm -rf /some/path/* deletes all non-hidden files in that dir (and subdirs).

rm -rf /some/path/.* deletes all hidden files in that dir (but not subdirs) and also gives the following error/warning:

rm: cannot remove directory: `/some/dir/.'  rm: cannot remove directory: `/some/dir/..'  

What is the proper way to remove all hidden and non-hidden files and folders recursively in a target directory without receiving the warning/error about . and ..?

No comments:

Post a Comment