Table of Contents

The page will keep records of Linux commands which i think is helpful.

grep

  1. grep “example” -i -n /etc/libuser.conf
  2. cat /etc/libuser.conf | grep “example” -i -n

the command will find “example” in “/etc/libuser.conf” file and print it with line number

  1. grep “imp” /etc/*.conf –color
  2. grep -i -r –include “*.bash” “domain” ./ –color

find

  1. find /etc -type f -maxdepth 1 -iname “*.conf”

the command will find *.conf files without child directory in “/etc” directory

  1. find /etc -type f -iname “*.conf” -exec grep “example” {} +

the command will find all “example” in all “*.conf” file in “/etc” directory and print the line

crontab

  1. crontab -e

to edit crontab tasks.

add user

above commands will finish add shaoxp as admin user.

awk