New answers tagged

0

sed '/EXPORTER_JAR_PATH/,$d' file This would delete all lines from the first line that contains the substring EXPORTER_JAR_PATH to the end of the file ($ addresses the end of the file), inclusively. What your command does is to delete all lines that does not fall within the range between line 1 and the line that contains that string, inclusively. This ...


0

Managed to find the issue using strace. When i debugged the vsftpd using strace, there was an error message Cannot change directory. vsftpd tries to switch to the home directory of the ftp_username and when the directory was missing, the vsftpd failed (though there was no error logged anywhere). Creating the home directory for ftp_username fixed the ...


0

Using set builtin with pipefail solved the issue. - name: "Verifying file" shell: "set -o pipefail && cat filename | grep something | tail -1 | awk '{print $4}'" register: hname This will exit the task even if one pipe fails to get input.


4

Non-root users do not use ~root/.bashrc for the same reason that they also don't use any other user's ~/.bashrc—these files are individual per-interactive-shell startup files. If you wish standard aliases or other initializations for all bash users on a system, those declarations belong in the systemwide per-interactive-shell startup file /etc/bash....


0

Try this: hosts=($(echo "host[1-5],host7,host[13-15]" | sed 's/,/ /g')) string="" for h in ${hosts[@]}; do if [[ ! ${h//[^0-9]/} =~ ^[0-9]$ ]]; then for i in $(seq ${h//[^0-9]/ }); do string+="${h%[*}$i," done else string+="$h," fi done echo "${string%,}" Output: host1,host2,host3,host4,host5,host7,host13,host14,host15,


-1

Try bash's "Parameter expansion / pattern substitution" $ hostlist=host[1-5],host7,host[13-15] $ H1=${hostlist//[/{} $ H2=${H1//]/\}} $ H3=${H2//,/ } $ H4=$(eval echo ${H3//-/..}) $ H5=${H4// /,} $ echo "$H5" host1,host2,host3,host4,host5,host7,host13,host14,host15


-1

If you change your input to hostlist=host{{1..5},7,{13..15}} then eval echo $hostlist | tr ' ' , host1,host2,host3,host4,host5,host7,host13,host14,host15


0

I managed to figure out reason for this behaviour: Quoting from here actual spool files are only created if the remote server is down and there is no more space in the in-memory queue. By default, a short failure of the remote server will never result in the creation of a disk file as a couple of hundred messages can be held in memory by default.


-1

The mentioned steps are not working properly. The command are hidden from just PATH variable. If the user put the whole directory like /bin/ls, all the commands are working.


0

You can use virtualenv and pip to install ansible as described in this document by F5, just ignore the F5-specific ansible module info at the end.


0

Short bash script that uses GNU datamash to find the maximums: #!/bin/bash mapfile -t files < <(datamash -st'-' -g1 max 2 < "$1") IFS=, echo "${files[*]}" Usage: $ ./example.sh input.txt ac-2,bc-2


0

You are adding an incorrect repository for RHEL. RHEL is based on RPM packages, but you are adding a repository with DEB packages for Debian/Ubuntu. Add repository in file: /etc/yum.repos.d/tor.repo [tor] name=Tor for Enterprise Linux $releasever - $basearch baseurl=https://rpm.torproject.org/centos/$releasever/$basearch enabled=1 gpgcheck=1 gpgkey=https://...


0

You can sort the filenames in reverse and then select the first occurrence of each filename: $ cat input ac-1 ac-2 bc-1 bc-2 $ cat input | sort -r | awk -F '-' '!seen[$1]++' bc-2 ac-2 The awk command takes '-' as delimiter and then prints each line where an ...


3

ncurses is the runtime package; to build software with ncurses, you need to install the development package, ncurses-devel.


1

I’m not aware of a repository providing ecryptfs-utils for RHEL 8. The package was removed in RHEL 7, and the upgrade path is to switch to LUKS (re-encrypting the data). However it is still available in Fedora, and in EPEL 7, so you could request a build for EPEL 8; see the ecryptfs-utils EPEL 7 request for a template.


0

To always boot with CLI, run: systemctl set-default multi-user.target To always boot in with GUI, run: systemctl set-default graphical.target


0

This file Documentation/filesystems/tmpfs.txt (linked by hncr in his answer) explains well: Another similar thing is the RAM disk (/dev/ram*), which simulates a fixed size hard disk in physical RAM, where you have to create an ordinary filesystem on top. Ramdisks cannot swap and you do not have the possibility to resize them. But a tmpfs is a ...


1

Short answer: If your physical memory is not able to be served the percentage portion (90%),eventually swap will be used. When IO is larger than the designated percentage IO errors occur. Long answer: The percentage represents the portion of your memory(physical memory + swap partition or swap file}. Assuming that you have 1TiB DIMM (RAM) and set swap ...


0

From the kernel docs for tmpfs: tmpfs has three mount options for sizing: size: The limit of allocated bytes for this tmpfs instance. The default is half of your physical RAM without swap. If you oversize your tmpfs instances the machine will deadlock since the OOM handler will not be able to free that memory. ...


2

You didn't enable epel. You enabled the codeready-builder repo. First, add the epel repo: dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm It's normally enabled by default after it's installed but if not: dnf config-manager --enable epel You can then install dkms.


1

If the GRUB boot menu includes multiple kernel versions, try booting with an older version. (There should always be at least the current kernel and the kernel used by the OS installer: the latter has a version number like 0-rescue-<numbers>. If the boot is successful with an older kernel, then the problem might be a damaged/missing initramfs file. ...


2

Try booting with installation media, and diagnose/fix from there. Back up anything important! Chances are the machine or the system is broken, needing a migration or a reinstall from scratch.


0

No, just editing /etc/fstab cannot cause xfs_repair to be executed. For other filesystem types, it would work. But XFS is special here. Changing the 6th field of /etc/fstab to a non-zero value on a XFS filesystem will cause the system to run fsck.xfs, whose man page says: NAME fsck.xfs - do nothing, successfully [...] However, the system ...


0

You have asked for a lazy unmount (umount -l). This will only unmount the filesystem when there are no more processes accessing it. The documentation (man umount) itself says -l Lazy unmount. Detach the filesystem from the filesystem hierarchy now, and cleanup all references to the filesystem as soon as it is not busy anymore. In this scenario you ...


1

If the files on /dev/sda have errors, then you need to run fsck on it. Keep in mind that it won't actually repair the disk itself but just the files. If the disk indeed has errors and it's failing, then it's best to replace the disk and restore the data from a backup because if it gets bad enough, you'll possibly have data loss especially if the disk dies ...


0

yum install pcre-devel -y fixed the issue, the devel(development) package was missing.


0

As it says: A start job is running for LSB ( 3 out of 5 min ). It requires 5 minutes to finish. After that, your machine will continue booting. Did you wait the job run time to finish ? Do you have still problem after job finished?


0

Worked on CentOS Linux 8 - sudo grub2-mkconfig --output=/boot/grub2/grub.cfg


0

Sometime the list of files is not sorted properly. You can try: cat linux* > centos7-rpm.tar.gz or cat linux?? > centos7-rpm.tar.gz in case you have other files which start with letters linux but to be sure about the sequence you can try something like: cat $(ls -1 linux[a-b][a-z]|sort) > centos7-rpm.tar.gz ls -1 will generate one per line ...


2

Because tar and gzip are independent operations you should check first if the compressed archive if OK: gzip -t file.tar.gz and after this (if OK) you must decompress the archive and test the tar archive: gzip -dc file.tar.gz|tar tvf -


0

So as GracefulRestart pointed out modprobe -n -v cramfs doesn't perform any changes. Another way of writing the command is modprobe --dry-run --verbose crampfs. You'll notice that this is why it appears under the audit section in the CIS entry, and your output differs from what is expected as you are not compliant. So you can move to the remediation section ...


3

More or less like you would for /dev/sdb1. First of all unmount /dev/sdb1 (you can mount it somewhere else). umount /dev/sdb1 You can create another directory and mount the disk there: mkdir /physical-data mount /dev/sdb1 /physical-data ...(the other options you already have). In /etc/fstab, rename "/data" to "/physical-data". Now the hard disk is ...


3

It's a bug in the libmagic library that file is using. A simple workaround is a "useless use of cat": echo '#! /bin/sh' | file - cat /path/to/fifo-or-special | file - The bug was first introduced in https://github.com/file/file/commit/fb6084e0f08: commit fb6084e0f08aef8991afcb3eb74168a456601908 Author: Christos Zoulas <christos@zoulas.com> Date: ...


0

Your first error is because %setup expects some structure. You can either change how you create a tarball (see https://rpm-packaging-guide.github.io/#preparing-source-code-for-packaging ) or change the behavior of %setup using arguments (see http://ftp.rpm.org/max-rpm/s1-rpm-inside-macros.html ). In your however-part, you created source package. Which ...


0

saved on memory cache There is no such thing really. You start from this buff/cache: ]# free -g total used free shared buff/cache available Mem: 7 0 3 0 3 6 Swap: 0 0 0 This gives the amount of RAM currently used as buffer or ...


-1

I think you may have a misunderstanding about how the memory heirarchy works. The heirarchy goes, from closest to the CPU/fastest to slowest: CPU register > Cache memory > RAM/main memory > Disk The cache memory is in between the CPU and main memory and is faster to access than the main memory. Typically, chunks of nearby data (i.e. copies of blocks of ...


0

Apparently you're trying to install barman-cli from a 3rd party repository, which is fine, but this repository doesn't provide all the dependencies that barman-cli requires. You could contact the upstream provider for help, since they are responsible to deliver the required packages, but according to their Github page barman-cli has been merged into barman ...


3

CVE-2018-1312 was fixed in version 2.4.6-89 of the RHEL 7 httpd package; see RHSA-2019:1898 for details. You don’t need to upgrade to 2.4.41 for this; if your system is kept up-to-date, it will already have the fix, otherwise upgrade as usual to get it (see How do I apply package updates to my RHEL system?). The upgrade is safe, you don’t need to take any ...


2

ANSWER: The error is a red-herring: Required Plugins weren't distributed in RHEL 8.0 - 8.1 "In RHEL 8, the postfix package has been split into multiple subpackages, each subpackage providing a plug-in for a specific database. Previously, RPM packages containing the postfix-pcre, postfix-cdb, and postfix-sqlite plug-ins were not distributed. ...


0

The file you’ve installed tells YUM about the EPEL repository, but it doesn’t ship any of the data contained therein; the packages are retrieved from a variety of mirrors on the Internet. You can see the packages here. Yes, you can download the packages manually. However, as far as I can tell, the MinGW-w64 packages are no longer available from EPEL 7... ...


2

The FreeBSD manual page tells me this is an utility to manage users and groups. All Linux distributions (and most Unices I know) have some special toolset for this, in Linux' case often derived from Debian's shadow-utils. Learn to use the native way of doing things! Such a tool depends intimately on the target's layout (how the relevant files are called, ...


0

The various requirements appear to be spread across the CodeReady, AppStream and Epel repos. You'll need to setup all those and then it appears that installing just about every texlive-* package is needed. I put the list of those in texlive-requirements.txt. Then I created this Dockerfile and built it. I also assume you'll have some python requirements to ...


1

Had to change the ownership of the cert file to ec2-user:root to get the process to access the cert file. This resolved the issue. Huge thanks to Roaima.


0

List of processes running ps -ef | grep sshd root 1023 1 0 13:15 ? 00:00:00 /usr/share/centrifydc/sbin/sshd -D root 1899 1023 0 13:15 ? 00:00:00 sshd: ec2-user [priv] root 1900 1023 0 13:15 ? 00:00:00 sshd: ec2-user [priv] ec2-user 1994 1900 0 13:15 ? 00:00:00 sshd: ec2-user ec2-user 1996 1899 0 13:15 ...


2

With a host-only virtual network, you should not use the same subnet that the physical network your host computer is using. The virtual machines can only talk (directly) to the each other and to the host machine using the "Virtual Host-only Network #2" adapter. If you want to connect your Host-only virtual network to your local LAN, the host VirtualBox host ...


0

Looks like yum docker-engine querying came back to a normal state Even docker project url curling is working without the warning message seen in my first post Looks like the deployment process hit a bad state in the public repo and hence caused these errors.


0

You have to find the specific module binary available by yum and copy it to the offline server, so you are basically downloading a binary module on your machine followed by copying the directory into the designated place from your VPN. one solution can be to use yumdownloader --resolve <package name> The order of installing them is determined by ...


3

Red Hat Virtualization product page. Red Hat® Virtualization® is a complete open-source virtualization solution, derived from the Red Hat Enterprise Linux® kernel, Kernel-based Virtual Machine (KVM) technology, and oVirt virtualization management projects. Red Hat Virtualization is their paid support offering of the upstream oVirt enterprise ...


Top 50 recent answers are included