ApacheBench Tool (ab)

ApacheBench tool comes bundled with the standard Apache source distribution for measuring the performance of HTTP web servers. This especially shows you how many requests per second your Apache is capable of serving by generating a flood of requests to a given URL and returns some easily digestible performance related metrics to the screen.

For example, the following command will execute 1000 HTTP GET requests, processing up to 10 requests concurrently, to the specified URL.

ab -k -n 1000 -c 10 "https://comparis.com.br/"

Yii2 Gii – Table Update

ALTER TABLE `tablename`
  ADD `lock` int(5) NOT NULL,
  ADD `created_at` date DEFAULT NULL,
  ADD `created_by` int(11) NOT NULL DEFAULT 0,
  ADD `deleted_by` int(11) NOT NULL DEFAULT 0,
  ADD `deleted_at` date DEFAULT NULL,
  ADD `updated_at` date DEFAULT NULL,
  ADD `updated_by` int(11) NOT NULL DEFAULT 0
  AFTER branch_status;

Magento Set the File permission

Magento Set the File permission (you need to be root/ sudo)

sudo find var generated vendor pub/static pub/media app/etc -type f -exec chmod g+w {} \; && sudo find var vendor pub/static pub/media app/etc -type d -exec chmod g+ws {} \; && sudo chown -R www-data:www-data . && sudo chmod u+x bin/magento

With the path:
cd /var/www/html/magento2 && find var generated vendor pub/static pub/media app/etc -type f -exec chmod u+w {} + && find var generated vendor pub/static pub/media app/etc -type d -exec chmod u+w {} + && chmod u+x bin/magento

Linux and Unix Copy files

To copy a directory with all subdirectories and files, use the cp command. Below is an example command of how you would use the cp command to copy files. Additional information about this command and other examples are available through the above cp link.

cp -r /home/hope/files/* /home/hope/backup

In the example above, the cp command would copy all files, directories, and subdirectories in the /home/hope/files directory to the /home/hope/backup directory.

or

Copy a folder called /tmp/conf to /tmp/backup:

cp -avr /tmp/conf/ /tmp/backup

-a : Preserve the specified attributes such as directory an file mode, ownership, timestamps, if possible additional attributes: context, links, xattr, all.

-v : Explain what is being done.

-r : Copy directories recursively. Example