aptitude search '?installed?not(?automatic)?not(?reverse-depends(?installed))'
To use output in scripting add a key: -F %p
This package list can be passed as an argument list an apt-get install program on your new system.
aptitude search '?installed?not(?automatic)?not(?reverse-depends(?installed))'
ssh-keygen -y -f ~/.ssh/id_dsa | ssh remote.org tee -a ~/.ssh/authorized_keys
%sudo ALL=(ALL) ALL
#includedir /etc/sudoers.d
#!/bin/sh
### BEGIN INIT INFO
# Provides: haltIfNousers
# Required-Start:
# Required-Stop:
# Should-Start: gdm
# Default-Start: 2 3
# Default-Stop: 4 5
# Short-Description: Execute the halt command.
# Description:
### END INIT INFO
#Powers off the system if no user is logged in in 30 seconds
BLOCK_FILE=/tmp/haltIfNousers
case "$1" in
start)
$0 wait &
;;
wait)
touch "$BLOCK_FILE"
sleep 30
[ -e "$BLOCK_FILE" ] || exit 0
if ! who|grep '.*' -q ; then
echo $0: No users are logged in. Halting now.
shutdown -h now
exit 0
fi
rm -f "$BLOCK_FILE"
;;
restart|reload|force-reload)
echo "Error: argument '$1' not supported" >&2
exit 3
;;
stop)
rm -f "$BLOCK_FILE"
;;
*)
echo "Usage: $0 start|stop" >&2
exit 3
;;
esac
echo base_path/{subfolder1,subfolder2} | xargs -n 1 make clean -C
%_topdir .../rpm #Arbitrary
%_tmppath /tmp/rpm #Optional
#!/bin/sh
for d in _topdir _sourcedir _rpmdir _srcrpmdir _specdir _builddir _tmppath; do
mkdir -p `rpm --eval %{$d}`
done
# Doesn't override previously set value. See Parameter Expansion
SOURCES=${SOURCES:-`rpm --eval %{_sourcedir}`}
#Assumes your sources are in $PROJECTS/$PROJECT directory
tar --wildcards --exclude \*\.svn\* --exclude \*\~ \ -C "$PROJECTS" -zcf "$SOURCES/$PROJECT.tar.gz" $PROJECT
rpmbuild -ba "$PROJECTS/$PROJECT/$PROJECT.spec"
cp -i aaa/bbb/ccc/ddd/xxxx_{6,7}.tpl
cp -i aaa/bbb/ccc/ddd/xxxx_6.tpl aaa/bbb/ccc/ddd/xxxx_7.tpl
> ls
aaa/bbb/ccc/ddd/xxxx_4.tpl
aaa/bbb/ccc/ddd/xxxx_5.tpl
aaa/bbb/ccc/ddd/xxxx_6.tpl
> cp -i aaa/bbb/ccc/ddd/xxxx_{6,7}.tpl
> ls
aaa/bbb/ccc/ddd/xxxx_4.tpl
aaa/bbb/ccc/ddd/xxxx_5.tpl
aaa/bbb/ccc/ddd/xxxx_6.tpl
aaa/bbb/ccc/ddd/xxxx_7.tpl
cp filename{,_`date '+%F'`}