Showing posts with label bash. Show all posts
Showing posts with label bash. Show all posts

Friday, January 7, 2011

Starting conky on shell startup

All my attempts to start conky automatically on Linux startup have been unsuccessful. Now I have given up on that and am using a few lines of shell script to start conky on starting up the shell. As the first thing I do after starting up linux is to start the gnome-terminal, I have added a few lines to .bashrc to check if conky is running and if not to start it. I will have to do with this until a better solution can be found.



conky_ps=`ps -e | grep conky`
if [ "$conky_ps" = '' ]; then
conky -d
sleep 1
clear
fi

Wednesday, December 1, 2010

List only directories using ls command

 ls -d */

Will list all directories in the current directory.

For example, ls -d /mnt/*/ will list the path of all the directories in /mnt/.

ls -d1 */ will list all directories in the current directory one per line.