Category: Root

Linux ps command

ps x ps -e ps aux ps –u username

Some Web Administration Tasks

systemctl start httpdsystemctl start mariadbsystemctl restart httpdsystemctl restart mariadb systemctl enable httpdsystemctl enable mariadb

Monitor Process in Linux

Monitor Process in Linux •ps •pstree •top Who Monitors Processes? •Admins •Developers as needed Tasks •start, stop, restart, status, kill

Linux Shell Script: Until Example

How to execute Power Shell Scripts

•powershell.exe -noprofile -executionpolicy bypass -file .\hello.ps1 •Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy Bypass -Force; •Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy Unrestricted -Force; •set-executionpolicy remotesigned • •

Power Shell: Archive/Un Archive

•powershell Compress-Archive –LiteralPath lab8 –DestinationPath lab8.zip •powershell Expand-Archive –LiteralPath lab8.zip –DestinationPath “C:\mypath” -Force

tar in Windows cmd and power shell

Linux: Regular Expression: grep

Signed Integers egrep ‘^[+-]?[0-9]+$’ data.txt Floating Point Numbers egrep ‘^[+-]?[0-9]+[.]?[0-9]*$’ data.txt Canadian Postal Code egrep -q ‘^[A-Z][0-9][A-Z] *[0-9][A-Z][0-9]$’ info.txt

Power Shell: Disk Space, Memory Space, Process

Linux: Disk Space, Memory Space, Running Processes

df command – Shows the amount of disk space used and available on Linux file systems. du command – Display the amount of disk space used by the specified files and for each subdirectory. free command top or htop command vmstat command dmidecode command /proc/meminfo file Linux commands show all running processes Apart from ps …

Continue reading