random file from directory

random files from directory

Get Random Files From Directory Using Shell Script

Random files from directory is most sought after operation specially when working with files. You may be creating video from image, analyzing sample data and more.

Shell scripting has a lot to offer, not only random files from directory. The cool thing about shell script is, it is more native and fast.

I am working on generating videos from selected images and I needed to have ability to select random files from the given folder.
Continue reading random files from directory

Apache listing directory – I swear I have index file!

OK, the ultimate wisdom is you will put your index file on the webserver accessible directory and your website would be visible – right? Well, not all the time.
Apache might decide to list your files even though you put your index.php in the directory you are expecting..
The thing lies on the default configuration of your server. If the default http.conf file has the directory setting to list then it will list even in the virtual hosts.
The fix Add your DirectoryIndex

So typical .htaccess or your setting in http.conf file would look like

...you other configs
   DirectoryIndex index.php //or whatever you want it to start from 
....your other configs

vOILa