Categories
Linux Mastering Development

Package libdtrace-ctf is unavailable in Oracle Linux 8?

I’m trying to install libdtrace-ctf in Oracle Linux 8, so I started a container with docker run -it oraclelinux:8 /bin/bash, and executed the following commands [root@4730e14b58e1 /]# yum clean all 16 files removed [root@4730e14b58e1 /]# yum search libdtrace Oracle Linux 8 BaseOS Latest (x86_64) 2.2 MB/s | 26 MB 00:11 Oracle Linux 8 Application Stream […]

Categories
Linux Mastering Development

sort directories by last modified content (recursive)

I have a bunch of directories at the same level and would like to sort them according to the last modified date of the content (recursive) inside them. However, in nautilus, it looks like the directories’ "last modified date" are only updated if new files are created inside. Is there anyway to show the recursive […]

Categories
Linux Mastering Development

ubuntu link Operation not permitted

I was using ubuntu16.04, but failed to create link with following error root@k8s1:~# link kolla-ansible /kolla-ansible link: cannot create link ‘/kolla-ansible’ to ‘kolla-ansible’: Operation not permitted root@k8s1:~# link /mnt /kolla-ansible link: cannot create link ‘/kolla-ansible’ to ‘/mnt’: Operation not permitted

Categories
Linux Mastering Development

How to run Tmux when open terminal in arco linux?

I already know there are other questions like this, but their answers don´t help me. I want to run Tmux when I open the terminal in "arco linux", that is based in arch linux, so in order to do this, I set the following line in my .zshrc config file. tmux but it show an […]

Categories
Linux Mastering Development

Start systemd service from Ansible Playbook

What specific syntax must be used to get an Ansible playbook to successfully start a systemd service and make sure that the systemd service is running on an Amazon EC2 instance? CURRENT SYNTAX: The following syntax in an Ansible Playbook passes as successful when the playbook is run, but then we find that the myapp.service […]

Categories
Linux Mastering Development

Replacing regex matches in one file with lines from another file

I’m trying to replace lines that match the regex => ‘.*’, in one file with lines from another file. Two example files. File 1: ‘text_clear’ => ‘Clear’, ‘text_search’ => ‘Search’, ‘text_enabled’ => ‘Enabled’, File 2: emptied lost turned off I’m trying to run a linux command using awk/sed/grep to create a third file that would […]

Categories
Linux Mastering Development

Add a directory to path

I would like to know how to add a directory to path ( such as my downloads folder) so that whenever I type ‘cd Downloads’ from whatever directory, i go to ~/Downloads. Thanks

Categories
Linux Mastering Development

How to escape the | when running sed via SSH

I am running the sed command to add a string to a line in a file: This is the original line: export JAVA_TOOL_OPTIONS="-Doption=Xyz" It will be updated to: export JAVA_TOOL_OPTIONS="-Djava.net.useSystemProxies=false -Dhttp.nonProxyHosts=.abc.com|.abc1.com|localhost -Dhttps.proxyPort=443 -Doption=Xyz" This is the command: sed -i ‘1 s/export JAVA_TOOL_OPTIONS="/export JAVA_TOOL_OPTIONS="-Djava.net.useSystemProxies=false -Dhttp.nonProxyHosts=.abc.com|.abc1.com|localhost -Dhttps.proxyPort=443 /1 ‘ startup.sh This works fine when it is run […]

Categories
Linux Mastering Development

BASH – 2-D arrays – is this possible?

If I want a BASH 2D array, is there any recommended way of doing this for say, a N x M arrangement? On several occasions, I’ve had to define array1, array2, arrayN each of M elements in conjunction with case statements – but this is very clumsy. I realise it would be possible to define […]

Categories
Linux Mastering Development

Chainload SYSLINUX/EXTLINUX from GRUB2

Assuming a setup where no portion of SYSLINUX or EXTLINUX has been written to an area of a disk that has not been formatted with a filesystem (e.g., boot sector, BIOS boot partition), how would one go about chainloading SYSLINUX/EXTLINUX from GRUB2?