[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

I love jails... and in Linux, LXC is neat, but I need a jls command.




I always type 'jls' at the command line on Linux boxes.  Frustrating to say the least.  So, here is a good 'drop in' jls command for Linux boxes. 

https://www.monkeybrains.net/jls.txt

- Rudy



#!/bin/sh
#
#  I tend to type jls as I am from BSDlandia.
#  wget -O /usr/bin/jls https://www.monkeybrains.net/jls.txt
#

echo "   Yo, `hostname` is a Linux box.           LXC CheatSheet v0.1   "
lxc-ls -f
echo "---------------------------------------------------------------"
for NAME in `lxc-ls --active`; do
	echo lxc-console --name $NAME  /   lxc-stop --name $NAME / [31\;47m lxc-info --name $NAME
	counter=$((counter+1))
done
for NAME in `lxc-ls --stopped`; do
	echo [30\;42mlxc-start -d --name $NAME 
	counter=$((counter+1))
done

if [ "$counter" -ge 1 ]; then
	echo "---------------------------------------------------------------"
fi