install icloud on linux

1. Install: bash$  sudo snap install icloud-for-linux 2. Run one of the apps:   bash$ icloud-for-linux.keynote 3. Drag to your Dock (launcher panel) easy

Making your drive larger if you have a LVM drive

LVM is the Logical Volume Mapper, which lets you tell Linux that a volume (drive or partition) is part of a group of volumes/drives/partitions, which are considered one drive and which act together as one, called a "volume group".  If you run out of space on a Linux machine and you are using LVM, you can enlarge the drive and make it act as if it were a single drive, by adding another drive and then telling it to add that drive to the LVM volume group. You can tell that your drive is LVM if you see mention of LVM in the output of the "disk free" command, df. Note the wording "dev/mapper" Filesystem                         Size   Used Avail Use% Mounted on udev                               399M     0   399M   0% /dev tmpfs                               85M   956K   84M   2% /run /dev/mapper/ubuntu--vg-ubuntu--lv   194G   93G   93G   51% / Here's the simplest way to do it. Assume you have an existing drive called /dev/sda1, and it is almost full. Assume

/var/log/journal taking up lots of space

 If /var/log/journal is taking up too much space, you can clear it and prevent it growing too big again. Prevention: vi /etc/systemd/journald.conf   Look for: SystemMaxUse=2000M Or similar, and set it to a lower value Then: service systemd-journald restart Clearing once-off: journalctl --vacuum-time=2d assuming for example you want to clear everything before two days ago.

script to copy a template directory and omit files

The following script will copy a directory structure from a source to a target and omit files, copying only folders (directories) #!/bin/sh if [ -z "$1" ] ; then echo "Please give a source dir" echo "otherwise I will assume that the source is ".`pwd` echo "Synax: sourcedir/ targetdir/" sourcedir="./" fi if [ ! -z "$1" ] ; then sourcedir=$1 fi if [ -z "$2" ] ; then echo "Please give give a target dir" exit fi find $sourcedir -type d -links 2 -exec mkdir -p "$2/{}" \;

Creating a large single network drive

Normally to create a network drive you'd use NFS. However, gluster lets you merge multiple network drives into one single drive. I'll post more here as I go.

Identify traffic sources in bulk

 Say you have a list of IP addresses from a log file of hackers/losers/DDoSers. Step 1, install geoiplookup sudo apt-get install geoip-bin Step 2, for i in `cat list` ; do ( echo -n $i" " ; geoiplookup $i ) ; done | grep -v "South Africa" This basically will let you look up who they are and ignore IPs from home country, in this case South Africa. Once you decide which countries are likely to be hackers (Hello, former soviet bloc!) - then you block their IPs.