100g for deleting

On the assumption that the post titled “Delete file when you have more than 100g for deleting” on the “Linux.com - Content Feed” is not an elaborate joke, it’s not unlikely that it will be deleted so I will conserve it here: Hello Linix community members, Today I would like to share a simple script for deleting files when you have more than 100g for deleting and when you try to delete using rm -rm /path/fo/files failed.
Read more...

Listing screen sessions on login

Given Peter Eisentraut’s blog post on the same topic, I thought I would also share this Zsh function (from 2011):

startup () {
    # info on any running screens
    if \[[ -x $(which screen) ]]
    then
        ZSHRC_SCREENLIST=(${${(M)${(f)"$(screen -ls)"}:#(#s)[[:space:]]##([0-9]##).*}/(#b)[[:space:]]#([0-9]##).*/$match[1]})
        if [[ $#ZSHRC_SCREENLIST -ge 1 ]]
        then
            echo "There are $#ZSHRC_SCREENLIST screens running. $ZSHRC_SCREENLIST"
        fi
    fi
}
Read more...