apt-get Error org.freedesktop.DBus.Error.Spawn.ExecFailed: Cannot launch daemon, file not found or permissions invalid

Since a few months an error appeared in my ubuntu 12.04 everytime I ran the apt-get command. The last line of the command always showed the following error message:

It seems that one daemon couldn’t start.  After installing aptdaemon with the following command, the error message disappeared:



Bash – Working recursive through folders

If you use the bash to create or modify files, it could be necessary to process all subfolders. For testing I produced the following folders in a dircetory:

> tree
├── folder
└── folder with whitespace

2 directories, 0 files

My first idea was to use the find command in a for-loop. Here you see an example which prints out all folders on in the terminal.

If you run this short bash script and you have folders (files) with whitespaces you will run in trouble.


So my second try was a find command piped into a while loop.

If you run this script the folders are shown in the right way.

> ./while_find.sh 
./folder with whitespace

The find command gives you the opportunity to limit the commands in your script to particular files in your folder (and your subfolders). The following find command will only show files which end on csv