Archive: files

 

Posts Tagged ‘files’


So you have a plesk backup file and you want to extract and open the files from it? No problem. This blog will show you how. The file is a mime file. The "mpack" package will let you unpack it. First we install the "mpack" package PLAIN TEXT CODE: sudo apt-get install mpack Let's imagine [...]



 

Perhaps not as well known as it should be, PHP's glob() function is really quite powerful and exceptionally handy. Need to get a list of files in a directory - try this: PLAIN TEXT PHP: $tools = glob('includes/tools/*'); var_dump($tools); Want to delete all files matching a specific pattern, try this: PLAIN TEXT PHP: array_map('unlink', glob('export_feeds/my_feed_*')); [...]



 

If you need to check which files (eg PHP files for example) have been modified within the last few days, you can run this quick command. PLAIN TEXT CODE: find . -mtime -36 -iname "*.php" -fprint modded.txt This will generate a list and save it to a file called modded.txt. More Reading:How To Extract Files [...]



 

If you have some cron jobs set up and you are finding large amounts of files saved in your home directory (or root) then perhaps you have the same issue I had. I was using wget to call on some PHP scripts to run periodically. wget will do what it says on the tin and [...]