centos

How to correctly unzip weird character file in zip?

How to correctly unzip weird character file in zip? I’m really new in Linuxverse, so please understand if I’m asking standard question. I just downloaded a zip file using this link: https://io.genesis-ark.club/common/20240401/三国名将录(2).zip the first time I download using wget "https://io.genesis-ark.club/common/20240401/三国名将录(2).zip" I got ???????.zip after the download completed, so I just redownload it using wget "https://io.genesis-ark.club/common/20240401/三国名将录(2).zip" …

Total answers: 1

CentOS ls uses dpkg

CentOS ls uses dpkg I am logged in as a user on an CentOS version 6.9 HPC. When I try the ls command, I get: /usr/local/bin/ls: line 96: dpkg: command not found Abort, this script is only intended for Ubuntu-like distros When I open the corresponding ls file, line 96 has the line: # (internal) …

Total answers: 1

What file is /dev/btrfs-control?

What file is /dev/btrfs-control? I can’t find any explanation about this file in the official documentation, I just know from the official documentation in devices.txt that this file is: "234 = /dev/btrfs-control Btrfs control device". Asked By: xnl2d || Source It’s defined in fs/btrfs/super.c in kernel source code, and used for various BtrFS-specific ioctl() system …

Total answers: 1

What file is /dev/autofs?

What file is /dev/autofs? I searched /dev/autofs from https://www.kernel.org/doc/Documentation/admin-guide/devices.txt I searched for /dev/autofs in and found that it is 10,235. I used debian and stat /dev/autofs shows 10,235 but in centos it shows 10,235 in hexadecimal which is a,eb. May I ask why this is so? This file /dev/autofs after the documentation of the explanation, …

Total answers: 1

CentOS 7.9 not reporting full version number after recompiling kernel

CentOS 7.9 not reporting full version number after recompiling kernel I needed to enable SCSI support in CentOS 7.9 so I followed the instructions here: https://wiki.centos.org/HowTos(2f)I_need_the_Kernel_Source.html to add SCSI support and recompile, which worked as expected, but instead of uname -r reporting 3.10.0-1160.108.1.el7.x86_64, it only reports 3.10.0, and the vmlinuz files it creates in /boot …

Total answers: 1

Installing Qt 6 on CentOS 7

Installing Qt 6 on CentOS 7 I need to install Qt 6 development files to build a third-party application in CentOS 7. I have been informed that the following packages are required on Ubuntu 22.04 LTS: qt6-base-dev qt6-tools-dev qt6-tools-dev-tools libqt6svg6-dev I checked CentOS 7 package repositories, and I couldn’t find any package for Qt in …

Total answers: 1

How to only zcat files between two time durations?

How to only zcat files between two time durations? Scenario: I’ve a file called abcd.log.gz. I want to zcat only the files from time durations 17:30:00 to 18:30:00. Currently, I zcat the entire file. Then awk the logs between two time durations which I believe is storage heavy and I’ve to keep doing rm command …

Total answers: 1

Problem installing php-gettext-gettext package on Centos 9

Problem installing php-gettext-gettext package on Centos 9 I tried several options to install php-gettext-gettext package. dnf install php-gettext-gettext also dnf –enablerepo=remi install php-gettext-gettext but there is no such package in these repositories. How can I install php-gettext-gettext package on Centos 9? Asked By: Paramore || Source The package that provides gettext in CentOS 9 is …

Total answers: 1

How to prevent showmount from hanging?

How to prevent showmount from hanging? We are implementing a web front end to manage NFS and CIFS shared folders. One part displays the available share points (exports) available from any arbitrary IP address. The backend uses smbclient -L <ip> -U <user> to query SMB/CIFS shares and uses showmount -e <ip> to query NFS shares. …

Total answers: 1

SSH by LDAP groups – not work

SSH by LDAP groups – not work There are "31" servers configured from the same RedOS image (CentOS 7-based). They are entered into the LDAP samba domain, and are configured for authorization via ssh based on ldap user groups. For this purpose the following have been changed: created as root echo "Domain admins" > /etc/ssh/access_groups.conf …

Total answers: 2

Automate traversing a directory in Linux?

Automate traversing a directory in Linux? Currently, I am doing full manual work. find /home/bash_cookbook/bash_cookbook/glassfish/domains/blog/logs -mtime +7 -type f -name ‘application.log_*’ -exec rm {} ; It takes me 1 hour to just type all the directory name that I want to traverse. The problem? There are 100+ servers,20 different domains in each server each have …

Total answers: 3

Taking multiple backups at once?

Taking multiple backups at once? All the configs are located at /home/achhainsan/achhainsan/glassfish/domains/blog_website/config /home/achhainsan/achhainsan/glassfish/domains/register_sign_in/config I want to take backup of config of all these and put that into /home/achhainsan/achhainsan/all_config_bakup Inside all_config_bakup, the config should be named blog_website_config, register_sign_in_config and so on. We can consider them a part of directory for simplicity purposes. My attempt at solution: …

Total answers: 2

How to quickly edit commands in the Linux terminal?

How to quickly edit commands in the Linux terminal? If you’ve typed a command, especially a lengthy one, in a Linux terminal, and you want to delete one or more words and replace them with something else, is there a way to do this quickly within the terminal? This isn’t related to Linux specifically, but …

Total answers: 4

CentOS 7 with Apache 2.4 not serving content after change of root web directory

CentOS 7 with Apache 2.4 not serving content after change of root web directory I’m trying to change an apache web service’s root web directory /var/www/html to my custom directory /mnt/webfiles. However, after configuring the /etc/httpd/conf/httpd.conf parameters and restarting httpd, my test directory/files still cannot be browsed from webpage. Here’s the environment: OS: CentOS 7.9.2009 …

Total answers: 1

Automatically assign ip address to bridged network in VMWare Workstation?

Automatically assign ip address to bridged network in VMWare Workstation? This is how my servers with bridged adapters look like. I want to assign an ipv4 address to them. How do I do it using dhcp(preferred)? Or manual? Asked By: zeeshanseikh || Source If you are using bridge connection your router will assign IP from …

Total answers: 1

After configure an .sh with chkconfig, systemctl says unit myservice not found

After configure an .sh with chkconfig, systemctl says unit myservice not found I’m doing some labs for test setups… I’ve developed a bash script to set it to autostart using systemd. I installed chkconfig and configured my script as follows: Using root: cd /mypath cp myscript.sh /etc/init.d/ cd /etc/init.d chkconfig –add myscript.sh chkconfig myscript.sh on …

Total answers: 2

How to automatically change the name of a file on a daily basis

How to automatically change the name of a file on a daily basis I am new to Linux/CentOS and right now I am running into a little problem. My CentOS7 Server logs all Maillogs on a daily basis and moves them to the folder /var/log/old_maillogs. Right now the logs are saved with a name similar …

Total answers: 1

Install new SSD drive and move /opt folder to it

Install new SSD drive and move /opt folder to it I have a server with two SSDs in RAID1 configuration on a centos 7.9 machine. I am running out of space on the two SSDs, because of the RAID1 configuration and the size of the /opt folder. The RAID1 configuration has its’ benefits.I will install …

Total answers: 1