To run a rake task within a shell script using a cron job, do the following: First, specify the shell at the top of your .sh script #!/bin/sh   Then, change your directory to your rails application in your .sh script cd /home/user/app/current   Now, you need to manually define your PATH within the script: PATH=/your/paths:/etc/etc   To see your user’s PATH, do the following in your terminal: echo $PATH [...]
Read More
To list unique filenames using grep, do the following: grep -irl "search-term" .   Notice the ‘l’ flag, short for –files-with-matches, defined as “Suppress normal output; instead print the name of each input file from which output would normally have been printed. The scanning will stop on the first match.” The i flag just makes the search case-insensitive, and r is recursive.
Read More
If you run into the following error when installing FFmpeg on Ubuntu Package ffmpeg is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source E: Package ‘ffmpeg’ has no installation candidate You can do the following to install FFmpeg instead: sudo add-apt-repository ppa:jon-severinsson/ffmpeg sudo apt-get update sudo apt-get install ffmpeg The PPA [...]
Read More