Linux Shell Command I Used Before

--run .sh job command
sh .sh


--let job run behind stage
nohup ./.sh&

--met error as below when rub .sh job
error 'XX.sh: line XX: sqlplus:command not found'
method: source .bash_profile

--delete file, -f(delete directly without remaind)
rm -f filename

--delete folder
rm -rf foldername

--rename filename, mv(copy filename1 and renamed filename2)
mv filename1 filename2

--copy file/folder
cp /tellin/scu/temp /home/n-tinggan/scu

--check all process behind
ps -aux


--yesterday
'date --date"last day" +%Y%m%d'

--2 days ago
'date --date"2 days ago" +%Y%m%d'

--3 days ago
'date --date"3 days ago" +%Y%m%d'


--cp 20150810
--the files named like "evcTRA201503*.unl" copy to under the folder /home/n-tinggan
find . -name "evcTRA201503*.unl" -exec cp {} /home/n-tinggan ;

--change password

passwd

--create user

1. useradd -m n-tinggan 2. passwd n-tinggan

原文地址:https://www.cnblogs.com/ganting/p/4718732.html