This post is also available in: Romanian

Debian – How to delete files older than X days

xenno : August 31, 2015 9:36 pm : Codes, EN, IT, Linux

Hey, recently I have wondered what is the CLI command that I have to use in order to delete all the files older than X days. Using a debian server I have to use a linux command to do that.

I have discovered that I have to use the “find” command to filter those files first and then select them to delete.

Command Sintax:

find /path/to/files* -mtime +5 -exec rm {} \;

This searches for files older than 5 days in the mentioned folder and delete them all.


The first argument is the path to the files. This can be a path, a directory, or a wildcard as in the example above. I would recommend using the full path, and make sure that you run the command without the exec rm to make sure you are getting the right results.
The second argument, -mtime, is used to specify the number of days old that the file is. If you enter +5, it will find files older than 5 days.
The third argument, -exec, allows you to pass in a command such as rm. The {} \; at the end is required to end the command.

This should work on Ubuntu, Suse, Redhat, or pretty much any version of linux.

Leave a response »

Mobile and Tablets sites

xenno : October 11, 2011 11:41 am : Codes, Mondo Technicus

More of the people I know, started to complain that the browsers on smartphones and tablets do not have convenient sites with easy and accessible interface for this type of Internet user. For that, it seems that is required by the site administrator so dedicated to present a version specially created for these visitors. Server-side settings can implement a redirection of these visitors to a page dedicated to using the .htaccess file of that site. more »

Leave a response »

MyBB forum Romanian language pack

xenno : September 29, 2011 10:04 pm : Codes, Mondo Technicus


For a while I found that package to change the English language MyBB Forum in Romanian is missing.

I looked through my files and finally I found. Here, in this post, still to be found by those who seek it.

more »

Leave a response »

Secure Your Site (.htaccess)

xenno : September 28, 2011 3:05 pm : Codes, Mondo Technicus
 Secure Your Site (.htaccess)
One way to prevent unwanted access of your site is using the file .htaccess

– Restrict access to a known hacker / bot from accessing your site
– Allowing only certain IP addresses to view your site (while in development, for example)
– Allow only trusted individuals in your site (if your users IPs remain the same, because it’s safer)
– Banning people from a particular country (or any location unknown) to access your site
– Ban people from your site
more »
Leave a response »

HTML insert images in a line/gallery

xenno : July 5, 2011 1:59 pm : Codes, HTML, Mondo Technicus

Let’s say we want to put in a html page a few photos horizontally. This can be done easily using a table.
Tags <table> </ table> define the contents of a table. Between these tags must be included on these other tags <tr> <td> </ td> </ tr> so that the table will form <table> <tr> <td> </ td> </ tr> </table>.
more »


PHP-MySQL Connection

xenno : May 30, 2011 2:22 pm : Codes, Mondo Technicus, MySQL, PHP

For some time I discovered how to make a connection between a PHP document (script) and a MySQL database. To create dynamic sites that write and read a database is needed to introduce  into a PHP file that creates a connection between the two of them. This is a used predefined PHP function mysql_connect and can be invoked whenever we need a connection to a database. more »


HTML Colors – Names

xenno : March 17, 2011 1:44 pm : Codes, HTML, Mondo Technicus


The X-11 Color Set

There are two ways to put colors in HTML documents. One is to insert color code and the second is to insert color name. About the color codes I wrote a previous article and this one  it will handle the color names. In a file .html you can enter a line that defines a color as follows: more »


HTML Colors – Numbers

xenno : March 12, 2011 1:55 pm : Codes, HTML, Mondo Technicus

You’ll find that you often have to work with colors when constructing Web pages, so it’s probably a good idea to take a minute or two now and get the HTML color techniques down pat. Most of the time, you specify a color by entering a six-digit code that takes the following form: #RRGGBB

more »


What is HTML?

xenno : January 20, 2011 12:19 pm : Codes, HTML, Mondo Technicus
  • HTML stands for HyperText Markup Language, and is the predominant markup language for web pages.
  • HTML is the basic building-blocks of webpages.
  • A markup language is a set of markup tags, and HTML uses markup tags to describe web pages.
  • HTML markup tags are usually called HTML tags
  • HTML is written in the form of HTML elements consisting of tags, enclosed in angle brackets (like <html>) within the web page content. more »

PHP Image upload and resize

xenno : January 17, 2011 3:28 pm : Codes, Mondo Technicus, PHP

We all have been in situation where we allow users to upload images for content items or profile pictures. They’ll just upload huge images without considering bandwidth and disk space. Soon you have hundreds images above 2MB in size cluttering your precious harddisk space and taking up all of the bandwidth with just a few pageviews.

So how do you conquer this problem? Well, resize the images automatically. Keeping their ratio and quality but reducing their size significantly.
more »

« Page 1, 2»

Leave a Reply

Your email address will not be published. Required fields are marked *

CAPTCHA * Time limit is exhausted. Please reload CAPTCHA.

This site uses Akismet to reduce spam. Learn how your comment data is processed.