If you are taking the backup via script, you may need to delete your old backups on regular basis to avoid disk space issue. The following command will remove directories from “/home/mydirectory/” which are older more than a month: for
ls command is used to lists all files/folders in Linux. The default output does not sort the files by size. To sort the files by size, you need to pass -s or –sort=size option as follow: $ ls -s $
You may need to find all processes accessing particular directories i.e. /home/user. You can use fuser command to list all processes as follow: fuser -va /home/user Replace /home/user with actual path. lsof is another way but it shows all files
By default rsync uses SSH port 22 while transferring the files/folders between two servers. If you are using custom SSH port instead of default port 22, you will need to add additional flag in rsync command as follow: rsync -avz
You may receive the following error while executing man command on newly installed CentOS 6: [root@server ~]# man bash: man: command not found Generally CentOS comes with man but it is not installed on CentOS 6 minimal install. You can
You can use the following commands to start/restart/stop iptables on your Linux server: To start iptables: service iptables start To stop iptables: service iptables stop To restart iptables: service iptables restart You can determine whether iptables is running or not
Sometime, you may need to move some large folder from one server to another or you may require to take backup of user’s home directory. On Linux platform, you can use command tar to create an archive of the folder.