IT notes

No history

To avoid having command in history just prefix them with an empty space: $⎵ uname If using zsh: $ echo "" > ~/.zsh_history & exec $SHELL -l

macOs sparseimage

To create an install disk using an spare disk: $ hdiutil create -size 6GB -fs JHFS+ -volname "macOS_installmedia" -type SPARSE ~/Desktop/macOS_installmedia Mount it (or double-click in Finder to mount): $ hdiutil mount ~/Desktop/macOS_installmedia.sparseimage Use the createinstallmedia: $ sudo /Applications/Install\ macOS\ High\ Sierra.app/Contents/Resources/createinstallmedia --volume /Volumes/macOS_installmedia --applicationpath /Applications/Install\ macOS\ High\ Sierra.app

NATO phonetic alphabet

Symbol Code word A Alfa B Bravo C Charlie D Delta E Echo F Fox G Golf H Hotel I India J Juliett K Kilo L Lima M Mike N November O Oscar P Papa Q Quebec R Romeo S Sierra T Tango U Uniform V Victor W Whiskey X X-ray Y Yankee Z Zulu 0 Zero 1 One 2 Two 3 Three 4 Four 5 Five 6 Six 7 Seven 8 Eight 9 Nine

ZFS send receive

To send a zfs dataset being no root, on the origin server: # zfs allow -g wheel send,snapshot,hold tank/foo On the receiver, create the dataset and allow users in group wheel: # zfs create -o mountpoint=/foo tank/foo # zfs allow -g wheel compression,mountpoint,create,mount,receive tank/foo # umount /foo On the origin server create the snapshot to send: # zfs snapshot -r tank/foo On the origin server send the dataset by using:

Enable Paste

To enable paste in chrome, open the console and enter: var allowPaste = function(e){ e.stopImmediatePropagation(); return true; }; document.addEventListener('paste', allowPaste, true);

kld_list

To load kernel modules after local disks are mounted add this to /etc/rc.conf: kld_list="fuse" in this case module fuse will be loaded

hw.(machine|model|ncpu)

To get an overview of the system: # sysctl -a | egrep -i 'hw.machine|hw.model|hw.ncpu' hw.machine: amd64 hw.model: Intel(R) Xeon(R) Silver 4110 CPU @ 2.10GHz hw.ncpu: 16 hw.machine_arch: amd64

moosefs

Create a small distributed file system using 2 servers one acting as a mater/chunkserver and other only as a chunkserver. Install the required packages: pkg install moosefs3-cgi moosefs3-cgiserv moosefs3-chunkserver moosefs3-client For the master just add: pkg install moosefs3-master In all the servers add to your /etc/hosts and entry for the mfsmaster: X.X.X.X mfsmaster Before starting the master, crate the file /var/mfs/metadata.mfs with: MFSM NEW Create a pool to share:

MANIFEST No Such File or Directory

If when trying to install FreeBSD using bsdinstall you get: "Error while fetching file:///usr/freebsd-dist/MANIFEST" - no such file or directory Try to: [email protected]:~ # mkdir -p /usr/freebsd-dist/ [email protected]:~ # touch /usr/freebsd-dist/MANIFEST And then start again

ctrl-backslash

To send a quit signal to the process: ctrl-\ # (backslash) This will send a SIGQUIT