- Check whether Screen is installed
which screen
- If Screen is not installed on your system, run the following command:
- If your system uses yum, you can install Screen with the command below
yum install screen
- If your system uses apt, you can install Screen with the command below
apt install screen
- If your system uses yum, you can install Screen with the command below
- To run a Screen session, enter the screen command.
screen
- If your session disconnects for some reason, log back in to your server and run the screen -r command.
screen -r
This will reconnect you to your Screen session.
Move files in the Linux terminal
The mv command moves file(s) from one location to another.
To move a file from one directory to another with mv, remember the syntax below
mv <source> <destination>
For example,
mv example.zip /home
Check whether, it moves example.zip
ls /home
Rename the file as you move it
mv example.zip /home/newexample.zip
Rename a file without moving it to another location
mv example.zip renameexample.zip
Moving a directory
mv exampledir /home
Moving a file safely
mv --interactive example.zip /home
This will ask
mv: overwrite '/home/example.zip'?
If you do not want to manually intervene, use –no-clobber or -n instead.
mv --no-clobber example.zip /home
How to Clean the YUM Cache in CentOS
We need to clean the YUM cache to reclaim the disk space used or to fix some errors due to corrupted metadata files.
- Clean all the cached packages from the enabled repository cache directory.
yum clean packages
- Delete package headers.
yum clean headers
- Delete metadata for each enabled repository.
yum clean metadata
-
Clean database cache yum clean dbcache
-
Clean expire cache yum clean expire-cache
- Clean all cached information.
yum clean all
Done!
How to run php file through command line? How do I enable PHP?
For Windows, make sure you have PHP installed and type this into command prompt:
C:\Path\To\php.exe C:\Path\To\Your\script.php
And for Linux/Unix:
php /path/to/script.php
- Go to Tools & Settings > Updates to start the Plesk Installer.
- Click Add/Remove Components, expand the Web hosting section, and
- Then the PHP interpreter versions section.
- PHP from OS vendor (install)
How to disable functions using the PHP disable_functions directive in php ini
- PHP disable_functions Executable Handling
The disable_function is used to stop certain dangerous PHP functions from executing.
Example of disable_function.
disable_functions = "exec, system"
Use the disable_functions directive in php.ini file to disable specific functions.
At least disable exec(), shell_exec() and system(). (If using WordPress).
disable_functions = "exec, passthru, shell_exec, system, proc_open, popen, curl_exec, curl_multi_exec, parse_ini_file, show_source"
- « Previous Page
- 1
- 2
- 3
- 4
- …
- 7
- Next Page »