You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
***** user command_to_execute
|||||||||||||| +----- day of the week (0 - 7) [both 0 and 7 represent Sunday]
||| +------- month (1 - 12)
|| +--------- day of the month (1 - 31)
| +----------- hour (0 - 23)
+------------- minute (0 - 59)
Every 5 min
*/5 **** user command_to_execute
Every hour, from 9:00 to 18:00
00 09-18 *** user command_to_execute
Every day, at 9:00 and 18:00
00 09,18 *** user command_to_execute
Every day, at 17:30
30 17 *** user command_to_execute
Every weekday, at 17:30
30 17 ** Mon,Tue,Wed,Thu,Fri user command_to_execute
Find, Search by directory name.
find . -type d -name '*text.txt'
Find, Search by last modified.
find . -type f -printf '%TY-%Tm-%Td %TT %p\n'| sort -r
Grep, Regular expression to search for text in files.
# scan pci for new disk
find /sys -iname 'scan'echo"- - -"> /sys/devices/pci0000:00/0000:00:07.1/host0/scsi_host/host0/scan
# scan resize old diskecho1>/sys/class/block/sdX/device/rescan
# create PV and add to group
pvcreate /dev/sda
sudo vgextend centos /dev/sda
# scan when PV is whole disk and is added to group
pvresize /dev/sda
# add 10 GB
lvextend -L+10G /dev/mapper/vol
# add 100% free space
lvextend -l+100%FREE /dev/mapper/vol
# xfs file system
xfs_growfs /dev/centos/var
# ext3/4 file system
resize2fs /dev/centos/var
innodb_buffer_pool_size mysql
# go root
sudo su -
#checking current values
grep 'innodb_buffer_pool_size' /etc/my.cnf
echo"SHOW GLOBAL VARIABLES LIKE 'innodb_buffer_pool_size';"| mysql
echo"SELECT ROUND (@@innodb_buffer_pool_size / 1024 / 1024 / 1024, 2) 'innodb_buffer_pool_size (GB)';"| mysql
#change#mysql sometimes does not accept the <NEW_SIZE>, then you have to decrease it!!echo"SET GLOBAL innodb_buffer_pool_size=<NEW_SIZE>;"| mysql
#file
vim /etc/my.cnf
SELECT uniques(host.ipV4Address) FROM Metric WHEREhost.hostnameLIKE'%jenkins-test%'ANDhost.ipV4AddressIS NOT NULL
Loop in bash terminal.
# for loopforiin {1..5};doecho"Liczba: $i";doneforfilein$(ls /home/pbujakiewicz/);doecho"Plik: $file";done# while loopwhiletrue;doecho"To się powtarza"; sleep 1;done