To ignore any specific mounts that are being monitored when using collectd df plugin.
Add the below to the /etc/collectd.conf file
<Plugin "df"> MountPoint "/^/export/home//" IgnoreSelected true </Plugin>
To ignore any specific mounts that are being monitored when using collectd df plugin.
Add the below to the /etc/collectd.conf file
<Plugin "df"> MountPoint "/^/export/home//" IgnoreSelected true </Plugin>
If you receive the below error when running an init.d script or another script.
sudo unable to execute etc init d no such file or directory
Check that your file does not have any ^m windows characters as this might be the case.
To perform a force cp. It could be an alias which is stopping it from running.
Try running the below to get round this
/bin/cp -f /directory /directorydestination
To cd into a directory to run a specific command as part of a bash script.
Add the below command
cd /usr/local/directory; \ | pwd
To allow directory permissions to anyone to write.
Run the below
chmod 0777 /tmp/directory
Run the below in the directory of choice to remove files + 3 days.
find . -mtime +3 -exec rm -rf {} \;
To remove the warning from a find if your using a grep.
Just add 2>/dev/null to the find command that your running.
find /directory/ -type d -maxdepth 1 -exec basename {} \; 2>/dev/null | grep -v lbr | egrep "*-10-*"