diff --git a/image-files.md b/image-files.md index b05b643..d1b97df 100644 --- a/image-files.md +++ b/image-files.md @@ -21,7 +21,9 @@ dd if=/dev/zero of=test.img bs=1000000 count=7800 conv=fsync ## resize image -One can change an images size with `truncate --size= `. this is usually used to increase image size in order to increase the file system size (i.e. make more space for rootfs). If the goal is to decrease the memory footprint, extra care has to be taken to not cripple the filesystem. +One can change an images size with `truncate --size= `. +This is usually used to increase image size in order to increase the file system size (i.e. make more space for rootfs). +If the goal is to decrease the memory footprint, extra care has to be taken to not cripple the filesystem. ## resize partition @@ -48,8 +50,9 @@ This is a quick step through the setup of a raspbian image: 1. download image 1. truncate image (see [resize image](#resize-image)) 1. resize partition with fdisk (see [resize partition](#resize-partition)) -1. resize filesystem on said partition with `resize2fs` (or similar) -1. setup loop device and mount boot partition (see [mount image](#mount-image-file)) +1. setup loop device for image (see [mount image files](#mount-image-files)) +1. resize filesystem on said partition (loop device) with `resize2fs` (or similar) +1. mount boot partition (see [mount image files](#mount-image-files)) 1. add empty file `ssh` to boot partition 1. add userconf.txt to boot partition, to set up initial user & password 1. disable resize script in boot/cmdline.txt (something with `firstboot`) diff --git a/linux/commands.md b/linux/commands.md index a1ab854..8235d92 100644 --- a/linux/commands.md +++ b/linux/commands.md @@ -11,3 +11,19 @@ Usage: ```bash find . -type f | xargs chmod 644 ``` + +### pipe output into clipboard + +> requires `xclip` + +One can save command output to the clipboard by piping it to `xclip`: + +```sh +# usage +command | xclip -selection clipboard + +# working example with 'echo' +echo "hello world" | xclip -selection clipboard +``` + +> NOTE: the argument `-selection clipboard` is required