Check These Out
Determines the flavor of a shared library by looking at the addresses of its exposed functions and seeing if they are 16 bytes or 8 bytes long. The command is written so the library you are querying is passed to a variable up font -- it would be simple to convert this to a bash function or script using this format.
Foward vnc securely from exampleserver.com
Looking for carriage returns would also identify files with legacy mac line endings. To fix both types:
$ perl -i -pe 's/\r\n?/\n/g' $(find . -type f -exec fgrep -l $'\r' "{}" \;)
$ DOCKER_APP_VARS=(DATABASE_USER=dbuserro, DATABASE_PASSWORD=maipass)
[jeff@omniscience container] (master)$ echo docker run $(printf -- " -e %s" ${DOCKER_APP_VARS[*]}) -name 12factorapp mattdm/fedora-small
docker run -e DATABASE_USER=dbuserro, -e DATABASE_PASSWORD=maipass -name 12factorapp mattdm/fedora-small
Note that the printf method by itsself doesn't include a newline (\n), so you'll need to embed it into an echo statement or something that does.
I recently found myself with a filesystem I couldn't write to and a bunch of files I had to get the hell out of dodge, preferably not one at a time. This command makes it possible to pack a bunch of files into a single archive and write it to a remote server.
Finds all *.p[ml]-files and runs a perl -c on them, checking whether Perl thinks they are syntactically correct
This does not require you to know the partition offset, kpartx will find all partitions in the image and create loopback devices for them automatically. This works for all types of images (dd of hard drives, img, etc) not just vmkd. You can also activate LVM volumes in the image by running
$vgchange -a y
and then you can mount the LV inside the image.
To unmount the image, umount the partition/LV, deactivate the VG for the image
$vgchange -a n
then run
$kpartx -dv
to remove the partition mappings.
Shows all block devices in a tree with descruptions of what they are.