How to check state of firewall on CentOS 7?

First of all – be careful not to stop firewall permanently. Stopping firewall is great security risk, and always check if your firewall is up, running and properly configured. To check state of your firewall run next command: firewall-cmd –state If it’s running, you will get very simple message: running Next, if you wand to…

Find recently changed files

How to search for recently changed files, ie. in last 24 hours Files changed in last 24 hours: find . -mtime -1 -print To find all files modified in the last 24 hours (last full day) in a particular specific directory and its sub-directories: find /directory_path -mtime -1 -print To find all files with regular…

How to sync two Linux directories?

You can sync two directories using command rsync. Practical example is to run next command: rsync -avz –delete /sourceDirectory /destinationDirectory This will sync /destinationDirectory with content of /sourceDirectory, with additional: a for archive more (more to follow about this), v for verbose, and z for zip compression. Option –delete means that rsync delete option deletes…