SSH
Copy file from a server using SSH command
Copy file from a server using SSH command
if we ant to use SSH command to copy a file to local folder we can use scp command
here is the main command
scp {SSH connection}:{full file path} /tmp/local
here is an example
scp ssh [email protected]:/user/zippedfile.zip /local
Showing the total of the loaded time of the page
If you want to see the total loaded time for any page to compare the time between the first and second time you can use this command
curl -L --output /dev/null --silent --show-error --write-out 'lookup: %{time_namelookup}\nconnect: %{time_connect}\nappconnect: %{time_appconnect}\npretransfer: %{time_pretransfer}\nredirect: %{time_redirect}\nstarttransfer: %{time_starttransfer}\ntotal: %{time_total}\n' 'https://www.example.com/'
Disable Smile-SA / Elasticsuite
We can disable Disable Smile-SA / Elasticsuite in Magento by executing this command
php bin/magento modeul:disable Smile_ElasticsuiteCore Smile_ElasticsuiteCatalog Smile_ElasticsuiteCatalogGraphQl Smile_ElasticsuiteCatalogRule Smile_ElasticsuiteCatalogOptimizer Smile_ElasticsuiteTracker Smile_ElasticsuiteThesaurus Smile_ElasticsuiteSwatches Smile_ElasticsuiteIndices Smile_ElasticsuiteVirtualCategory
to install the needed plugins you need to execute this command
Check if the Elasticsearch is installed
To display the status of the Elasticseach please use this command
curl -X GET 'localhost:9200/_cat/health?v&pretty'
Display Elasticsearch plugins SSH Command Line
to display the current installed Elasticsearch plugin use this command
curl -X GET "localhost:9200/_cat/plugins?v&s=component&h=name,component,version,description&pretty"
Linux Move Directory Command Line
To move SOURCE directory to a DEST directory use the mv command as follows:
mv source dest
mv /path/to/source /path/to/dest
Verify the proxy works , Elasticsearch
Verify the proxy works by entering the following command:
curl -i http://localhost:<proxy port>/_cluster/health
example:
curl -i http://localhost:8080/_cluster/health
How to apply the Magento 2 patches?
Most of Magento developer want to know exactly how they should apply the security patches on their websites
in this article we are going to talk about *.patch files
There are two ways to do this
1- using git command
git apply patch_filename.patch
or
2- using patch command
patch -p1 < patch_filename.patch
I hope this will be useful for you
Some GIT command
Get all bracnhes
git fetch --all
To reset specifc branch
Changing the SSH Port for Your Linux Server
You can change the default SSH port for your Linux server as an added security measure.