Signup/Sign In

Answers

All questions must be answered. Here are the Answers given by this user in the Forum.

**find** has a very handy **-exec** option:
***find . -name '*.csv' -exec cp --parents \{\} /target \;***
3 years ago
ls > /tmp/filelist
echo "* * * File List * * *"
cat /tmp/filelist

assumes you are not listing the files in **/tmp**. If that is the case change the **/tmp** to **/var/tmp**
3 years ago
Well, the obvious thing to do is just use **-v** so you can see their names as they're being copied:
***scp -vrp from/here to/there***

However, fiddling about with the file names is not really the best approach. If you find yourself needing to do this often, you should be using rsync instead. Since it has a -u option (only copy if the local file is newer than the remote), it will skip any files you've already copied, and if it finds the same file on both source and destination, it will only copy the differences to make the remote file the same as the local one.
3 years ago
Is the script only ever intended to run one minute after boot up, or can it be used at other times, too? In the former case, you can add sleep 60 to the beginning of your script, or in the latter case, add it to the crontab file:
***@reboot sleep 60 && my_script.sh***
As has been pointed out by sr_, though, perhaps you are tackling this in the wrong way, and a proper init.d or rc.d script would be a more robust solution.
3 years ago
*Using the terminal*
Setting the auto-save-directory

***gsettings set org.gnome.gnome-screenshot auto-save-directory '/home/yourpath'
***
Getting it
***gsettings get org.gnome.gnome-screenshot auto-save-directory
***
3 years ago
The solution to your problem is very old, but doesn't involve iptables. It's called the inetd super-server. Its configuration - /etc/inetd.conf - lets you define the port and protocol to listen for - the "service", defined in /etc/services - and the program to execute in case of a connection - which could be your logging script.

The service would be
***microsoft-ds 445/tcp # Microsoft Naked CIFS***
3 years ago
5 minutes of 60 seconds of 1000 milliseconds each gives 300000.

You can subtract this from a variable that containts current date in milliseconds using ** $(( ))**:
***dd=$(($(date +'%s * 1000 + %-N / 1000000')))
ddmin5=$(($dd - 300000))
echo $ddmin5***
3 years ago
To check which GPU is currently in command (that means which is an active VGA controller) type in
***lspci -vnnn | perl -lne 'print if /^\d+\:.+(\[\S+\:\S+\])/' | grep VGA
***
Any controller with **[VGA controller]** at the end is your currently active GPU. The others are switched off. In the following example the Intel card is active while the nVidia one is not in use:
***00:02.0 VGA compatible controller [0300]: Intel Corporation Core Processor
Integrated Graphics Controller [8086:0046] (rev 02) (prog-if 00 [VGA
controller])
01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GF108 [GeForce
GT 540M] [10de:0df4] (rev ff) (prog-if ff)***
3 years ago
What you're trying to do is fragile; it depends on the format of the HTML document returned by ipchicken, and that can change without warning. This currently works for me, your mileage may vary:
***$ wget //www.ipchicken.com/ -qO - | grep -oE "\b([0-9]{1,3}\.){3}[0-9]{1,3}\b"
108.27.105.76***
3 years ago
Numbers are text too. Text can be reversed with rev without any arithmetic.
***#!/bin/bash
clear
read -p "Enter a number: " num
echo $num | rev***
3 years ago
Alright, I found it: if hoxx vpn addon is either disabled or uninstalled, it changes (at least) these 2 settings:

network.proxy.proxy_over_tls to false (true is default)

network.proxy.type to 0, even if another VPN connection is active at that time.

It's the former setting that is rendering the other addons ineffective - the other addons are not touching that setting upon install, since it's boolean type and the default value is the one they need.

I find this to be a very aggressive behavior from hoxx to do this
3 years ago
Ask rpm if the package is installed.
***$ rpm -qa|grep amazon-efs-utils***
If it is, check its contents.
***$ rpm -ql amazon-efs-utils***
Observe the package contents files. Also, understand that amazon-efs-utils adds some binaries prefixed by mount. Here is the output in an ec2 instance.
***$ rpm -ql amazon-efs-utils.noarch
/etc/amazon/efs/efs-utils.conf
/etc/amazon/efs/efs-utils.crt
/sbin/mount.efs
/usr/bin/amazon-efs-mount-watchdog
/usr/lib/systemd/system/amazon-efs-mount-watchdog.service
/usr/share/man/man8/mount.efs.8.gz
/var/log/amazon
/var/log/amazon/efs***
3 years ago