From 4c9c9ab88cec6b8c9364917564484d9170a55b3c Mon Sep 17 00:00:00 2001 From: garhve Date: Sat, 10 Dec 2022 08:59:16 +0800 Subject: change blog content and add font --- posts/3/index.html | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'posts/3/index.html') diff --git a/posts/3/index.html b/posts/3/index.html index 1a5acd0..bef5f11 100644 --- a/posts/3/index.html +++ b/posts/3/index.html @@ -125,7 +125,7 @@ delete file foo every minute * * * * * rm foo delete file foo every 15 minutes 1

Crontab

crontab is a useful tool, I really regret that I don’t familar it earlier.

It’s usage really simple, and these two are my frequent using:

-
crontab -e      #edit crontab file that reside in /var/spool/cron
+
crontab -e      #edit crontab file that reside in /var/spool/cron
 crontab -l      #list current crontab job
 

It basic syntax as follow, also really simple crontab-layout.jpg

@@ -185,7 +185,7 @@ e.g. echo path/to/most/inner/file | cut -d '/' -f1 this will give m

Daily update bt tracker

I already learn shell script for a while.. so I wrote a simple script to test whether I really got used to it, but result is obviously, I need more and more practice to memorize commands.

-
#! /bin/sh
+
#! /bin/sh
 #bt-tracker.txt
 site=https://raw.githubusercontent.com/ngosang/trackerslist/master/trackers_all.txt
 
@@ -231,15 +231,15 @@ e.g. echo path/to/most/inner/file | cut -d '/' -f1 this will give m
 
  • This will only search through those files which have .c or .h extensions:
-
grep --include=\*.{c,h} -rnw '/path/to/somewhere/' -e "pattern"
+
grep --include=\*.{c,h} -rnw '/path/to/somewhere/' -e "pattern"
 
  • This will exclude searching all the files ending with .o extension:
-
grep --exclude=\*.o -rnw '/path/to/somewhere/' -e "pattern"
+
grep --exclude=\*.o -rnw '/path/to/somewhere/' -e "pattern"
 
  • For directories it’s possible to exclude one or more directories using the --exclude-dir parameter. For example, this will exclude the dirs dir1/, dir2/ and all of them matching *.dst/:
-
grep --exclude-dir={dir1,dir2,*.dst} -rnw '/path/to/somewhere/' -e "pattern"
+
grep --exclude-dir={dir1,dir2,*.dst} -rnw '/path/to/somewhere/' -e "pattern"
 

more info could see man grep.

-- cgit v1.2.3-70-g09d2