All Questions

0
votes
1answer
45 views

Syntax for checking if variable contains digits only in bash

I was reviewing some old scripts on my machines and I saw this if expression and I have no idea what it is doing. Can someone explain it? if ! [[ "${count// /}" =~ ^[0-9]+$ ]] then echo 1 else ...
0
votes
1answer
34 views

Manjaro 18.0.4 Illyria installer waits on welcome

I'm trying to install Manjaro linux as dual boot with W10 on lenovo ideapad miix320 - 10icr convertible laptop. I managed to boot from usb into OS. When starting installer it keeps waiting on welcome ...
-1
votes
0answers
14 views

Maximize Server Usage for run multiple cron which have same command

I have 8 GB VPS (average 20% usage). Let's say it only has 1 cron. Cron run every minute 1 cron execute 10 data 1 cron finish to execute in 1.5 minutes Because time overlapping, i implemented CRON ...
0
votes
0answers
13 views

Is it possible to run a script on the host machine when a docker container starts or stops

I am to start a docker container and bind an IPv6 address to it by running docker run -itd --restart=always --name=<container> --net=br6 --ip6=2001:db8:8:2::100 <image>. However, I have to ...
0
votes
0answers
12 views

How can I reinstall php and apache on mac? I deleted some important php folders

How can I reinstall php on mac? I think deleted some important php folders. I can't find the great solution with even google. It's showing like this. macui-MacBookPro:~ mac$ sudo apachectl start ...
2
votes
1answer
57 views

Redirect standard error of one command to standard input of another command

I wish to redirect standard error of one command to standard input of another command like g++ filename.cpp 'redirection' less
3
votes
1answer
30 views

Why is CAP_NET_ADMIN insufficient permissions for ioctl(TUNSETIFF)?

I'm trying to write a very simple tun/tap program in Rust. Since I don't want it to run as root I've added CAP_NET_ADMIN to the binary's capabilities: $sudo setcap cap_net_admin=eip target/release/...
-1
votes
0answers
15 views

linux on macbook air 2018

Have anyone succeeded in disabling "secure" boot on macbook air 2018 (or similar models)? This is obviously needed to at least run a Linux liveusb, and there are online instructions saying that this ...
0
votes
1answer
25 views

Grub2 install failed with “unable to identify a filesystem in hotdisk… safety check can't be performed”

On a VM-ware insatnce, I am trying to install grub2 bootloader onto a brand new SCSI disk. I want to install it onto the disk's MBR. I run sudo grub-install /dev/sda and got the error "unable to ...
2
votes
2answers
61 views

Killing a process and diffing its result

I've been trying to write a simple bash script, but I cannot get it to work. I want to: Start a program, feeding it input from a text file (./prog < input1.txt) Wait a short amount of time and ...
0
votes
0answers
13 views

CentOS not recognizing Rackspace verbiage for saving iptables

I'm getting back into the Linux game and have installed CentOS server and am stalled with saving the iptables for Apache operation. The Rackspace guide tells me how to use the service command to save ...
0
votes
0answers
15 views

How to set Option 43 with ISC KEA DHCP server to boot Raspberry PIs

I'm trying to boot a bank of Raspberry Pi 3 Model B and B+ devices. I'm using ISC's KEA DHCP server (v1.5.0) to boot these from. Unfortunately these need to boot over a different network than the kea ...
8
votes
1answer
267 views

Different outputs for `w`, `who`, `whoami` and `id`

In command line platforms online, like for instance the one on Codecademy, when I run for cmd in w who whoami id do echo $cmd $cmd echo ========================= echo " " ...
0
votes
0answers
28 views

which part is the fingerprint in gpg public key

I am using gpg - $ gpg --version gpg (GnuPG) 2.2.12 libgcrypt 1.8.4 Am a newbie and hence trying to understand the difference between the two commands - $ gpg --list-key and $ gpg --...
1
vote
0answers
16 views

Does `sshfs -o allow_root` open any security holes? Why isn't allow_root enabled by default?

allow_root This option is similar to allow_other but file access is limited to the user mounting the filesystem and root. This option and allow_other are mutually exclusive. From mount.fuse(...
1
vote
2answers
25 views

tar a directory [duplicate]

#!/bin/bash current_date=$(date +"%m-%d-%Y") file="name Backup ($current_date)" tar -cvzf $file.tgz module8 My output needs to be named "name Backup $current_date" When I run the script is just ...
0
votes
0answers
18 views

Running a BASH script via crontab causes ecryptfs volume to unmount

On my MX-18 linux (Debian 9 Stretch based) system, whenever a script runs via cron, my Private ecryptfs volume unmounts. Confirmed, no issue running the same BASH scripts from a terminal. Tested with ...
0
votes
0answers
17 views

Automounting LUKS encrypted volume at boot time using USB memory as key

I'm setting up a new Debian Stretch installation, and it's all a bit new to me. I've used linux a lot, but I've never really been an administrator of a server before. Because this system, or some ...
0
votes
0answers
10 views

Shutdown PC after remmina connection closed

I'd like my PC to shutdown straight after I close my remmina remote connection. I searched for solutions but remmina itself shows abnormal behavior. someprogram && sudo shutdown -h 0 Running ...
1
vote
1answer
30 views

Why is this regex not working in awk?

I have a text file as such: Attribute 1.............. : attribute value Encode Date............................. : JUL 2007 Attribute 22076.......... : attribute value` I want to extract the JUL ...
0
votes
0answers
18 views

How can I copy sparse files from a ext4 file system to an exfat file system and keep the apparent size?

My issue is that I am trying to copy files from my Ubuntu linux system which uses a ext4 file system to a Sandisk 1TB USB card, which uses an exFat system. In the ext4 system, the entire directory ...
0
votes
0answers
20 views

ERROR: GC Allocation Failure - how to fix this? [on hold]

Installed atlassian-jira-software-8.0.2, after added big swap file it is working now, but I getting this error: # cat atlassian-jira-gc-2019-03-16_11-00-05.log.0.current Java HotSpot(TM) 64-Bit ...
1
vote
0answers
19 views

Determine which device was assigned to a USB modem?

I'm testing a Tinker board, which is an ARM gadget running Debian 9.8. I inserted a USB modem. It appears the modem was detected but I can't find a device for it: [ 8178.815663] usb 1-1.1.5: new full-...
0
votes
0answers
24 views

Fatal Error DISPLAY variable set incorrectly: :0

I want to install oracle weblogic server. I already downloaded it and it's fmw_12.1.3.0.0_wls.jar. In order to install it I'm instructed to run java -jar fmw_12.1.3.0.0_wls.jar. But when I run it I ...
0
votes
1answer
19 views

How do rules with overlap coverage work together in general?

https://serverfault.com/questions/247176/iptables-only-allow-localhost-access#comment224878_247180 iptables -A INPUT -p tcp -s localhost --dport 25 -j ACCEPT iptables -A INPUT -p tcp --dport 25 -j ...
-2
votes
1answer
29 views

What is a chain in iptables?

Iptables is used to set up, maintain, and inspect the tables of IPv4 packet filter rules in the Linux kernel. Several different tables may be defined. Each table contains a number of built-in ...
1
vote
1answer
28 views

Unable to delete directory, imutable flag is not set, not mounted

So i have this directory that causes a lot of problems when trying to delete lxd via snap. The directory in question is /var/snap/lxd/common/lxd/storage-pools/default/. If I try to delete it with sudo ...
0
votes
1answer
28 views

all commands hang forever

After ssh into a VM, I am not able to run basically any command such as ps aux, cd /proc; ls, top, dmesg or systemctl status, all of them hangs, so I don't even know how to spot the problem. Linux ...
0
votes
0answers
2 views

Moving from Phenom II to A6 APU - frequency does not reduce in Ondemand

Due to a hardware failure I had to move the Linux system from the Phenom II where the frequency stayed at 800 Mhz and scaled up when necessary, to an A6 APU system, where the frequency always stays at ...
0
votes
0answers
16 views

Latency of SSDs versus HDDs [migrated]

We are currently using an HDD for our NetApp storage for our VMs. We're considering replacing them with SSDs, but many disk manufacturers have different performance. What range of latencies can we ...
0
votes
0answers
25 views

ffmpeg black screen recording

When I record my desktop or recording video with ffmpeg it generates a black video. My operating system is Ubuntu 18:04 bionic kernel 4.16 Here is the command I'm using : ffmpeg -f x11grab -s ...
0
votes
0answers
21 views

we have copied files to local folder (/data) but we are getting some of directory with ? symbol. why it is ending with question mark [on hold]

i get the error "Test?" TPD? Please let us know the reason why it is ending with question mark .
1
vote
1answer
23 views

Taking input in a script and making sure there's only one parameter

I'm currently working on an assignment where I have a script that is basically just getting to learn using grep with different regex's. I have the script written except for the first part where I am ...
0
votes
0answers
29 views

Bind SSH client to two different host addresses

I have this port forwarding solution for testing purposes. There is a distant server named box and a local machine named tower, on two separate networks. box is accessible through the internet. On ...
0
votes
1answer
14 views

EXT4 CRC32C checksum algorithms are badly documented

So I'm making some kind of research on EXT4 checksums. I found this page and tried to calculate checksum by myself. I've started with Superblock since it is sounds pretty simple: "The entire ...
0
votes
0answers
14 views

Allowing read write access to a directory under SELinux

Is it possible to allow ANY process to read/write to a directory under SELinux? What I'd like is proper 0777 access to a directory and I really don't care which processes read or write to it. I know ...
0
votes
1answer
23 views

Extend /dev/sdb3 partition

I am new to linux. I am trying to clone my linux usb live persistence from 32GB drive to 64 GB drive. After I clone it, there are some unallocated space (32GB). I have done some research but I still ...
0
votes
0answers
4 views

Error on iscsi initiator “umount your filesystem and correct the perameter, log I/O error”

The network device is getting created as well a mounted on iscsi client machine,and filesystem given is xfs. But when I reboot the machine, it shows error "Log I/O error, umount the filesystem and ...
0
votes
0answers
20 views

How can I configure bidirectional protocol-independent port forwarding?

I am attempting to solve the following problem: I have a system which I will henceforth refer to as "Local" that hosts a service on port 80 and port 443, and depends on sending outgoing requests on ...
0
votes
1answer
25 views

Monitoring solution wihtout client-install

I already wasted days to look for a very minimalist (cpu/ram/ping/ssh/disks) monitoring tools that discover hosts by itself instead of installing a client application on each host. (I can accept ...
0
votes
2answers
62 views

What's the use of the login command?

I just know the login command while reading a book. I wanna know what exactly it does. From man login: The login program is used to establish a new session with the system. What does session ...
1
vote
1answer
76 views

Passing arguments from one script to another

Let's say I am in a Bash script and am sourcing a file. How do I pass variables to another script after I source the file like this. sed -i 's/ = /=/' $file source $file Let's say file contains ...
1
vote
1answer
18 views

Parted partition drive with small partition at the end

I would like to partition a drive from a script, so that there is a big partition filling most of the drive, then a small one at the end. So far I have come up with. parted -s -- /dev/sda mklabel ...
0
votes
0answers
25 views

How Can I Kill Sockets Related to Services on Localhost?

I am trying to close sockets related to my webserver so the client does not have to refresh the browser twice to connect to the new webserver. I have successfully written a bash script which can ...
0
votes
0answers
30 views

cannot find Trash folder! Ubuntu 18.04

I am running a preinstalled version of ubuntu 18.04 but cannot find Trash folder. The typical places don't have the folder. ~/.local/share/Trash <-- does not exist /root/..../Trash <-- does ...
0
votes
2answers
42 views

shell - extracting date & time from logs

I have web server log files that look like this: 2001:67c:1220:80c:d4:985a:df2c:d717 - - [22/Feb/2019:07:49:01 +0100] "GET / HTTP/1.1" 200 58266 "-" "curl/7.61.1" 2001:67c:1220:80c:d4:985a:df2c:d717 -...
1
vote
3answers
55 views

Execute shell script without password

I have a shell script with a bunch of commands, one of them needs root. I want to execute the script without entering passwords at all: neither before script nor in the middle of execution. How can I ...
1
vote
1answer
20 views

Using terminal to zip unknown amount of packages with dynamic names

I am trying to figure out a solution for unix based systems (maxOS, Linux) to zip unknown amount of packages, ideally without requiring users to install any additional third party software. I have ...
0
votes
1answer
43 views

Where does main function get allocated?

When concerned with a memory layout for a process, all function calls within the process get a new stack-frame into the stack. I'm not sure if this is true for main function as it seems like main ...
-1
votes
0answers
37 views

How can I extend the memory on my Chromebook?

I have a chromebook XE501C13 with 4Gb memory, but I reckon an extra 2Gb would be an advantage. Can I enable this on my machine? And how?

15 30 50 per page