
Sometimes when you are committing changes in git you’ll find that a number of files have been deleted.
You could manually set these files to delete by individually issuing the command:
git rm filename
However, there is a shortcut. If you issue the command:
git ls-files --deleted
It will return a list of all files that are flagged as deleted.
You can then simply pass that list to git rm, using a combined syntax like this:
git rm $(git ls-files --deleted)
Just don’t forget the--deleted
parameter!

To see what storage engine is used by the server by default you can use the following command in the MySQL/MariaDB shell:
show variables like '%storage_engine';
You can view a list of supported engines using:
show engines\G;
To find out what storage engine your tables are using by schema use this command. You might want to filter by TABLE_SCHEMA
to see a specific database.
select TABLE_SCHEMA, TABLE_NAME, ENGINE
from information_schema.tables;
You can view statistics about a particular engine using the following (adjust for the relevant engine):
show engine innodb status\G

By default on Apache web servers, PHP code will not execute in a file that does not have a .php
(or similar) extension. So even though you can embed PHP into a HTML file, it won’t execute when the file extension is .html
, .htm
etc.
To change this, you can add a .htaccess
file to allow PHP execution.
Here are some examples depending on your system:
AddType application/x-httpd-php .html .htm
For certain hosting providers you may need to do this (adjust for PHP version too).
Addhandler application/x-httpd-php5 .html .php
Put this in a file called .htaccess
in the same folder as your HTML files.

For example, on a Mac, you’ll often find .DS_Store
files. To find and remove these you can run the following command to search for and remove every instance:
$ find . -type f -name ".DS_Store" -exec rm {} ;
This will find all files (-type f
) called .DS_Store
and execute the rm
(remove) command on that set {}
.
Run from the top directory and it will recurse its way into all sub directories and remove the files. This can be a dangerous command so use with caution.
You can also adapt the command to execute something else (e.g. a mv
to another location for example.