Shell Script Tutorials (0 ~ 62)

Tutorial-1: Introduction

Tutorial-2: Shell, Kernel, Terminal & More

Tutorial-3: View System Date, Calendar
- cal, cal feb 2016, cal 8 2016
- date, date '+%m-%y %H:%M:%S'

Tutorial-4: Create Files & Directories
- touch, mkdir

Tutorial-5: Create, Merge & Play Test Files
- cat > test1, ctrl+d, cat > test2, ctrl+d
- cat < test1, cat test2
- cat test1, test2 > test3

Tutorial-6: Rename & Delete Files & Directories
- mv old new
- rm old
- rm -r mydir, rmdir mydir

Tutorial-7: Create Copies, Links to Files & Directories
- cp old new
- ln old new
- ln -s old new

Tutorial-8: File Permissions
- umask (mask to 0666 for create file or directory)

Tutorial-9: See What's In Using 'ls'
- ls, ls Documents/
- ls -l, ll
- ls -a

Tutorial-10: Change File Permissions Using ‘chmod’

  • chmod 664 test, chmod 775 test
  • chmod o+x test, chmod g+x test, chmod +x test
  • uname, uname -a show kernel info

Tutorial-11: Count Lines, Words & Characters Using ‘wc'

  • file *
  • wc test2 (line, words, characters)
  • wc -l test2, wc -w test2, wc -c test2

Tutorial-12: Sort

  • sort animals, sort sports

Tutorial-13: Cut Through Your Files

  • cut -d”-“ -f 1,3 players

Tutorial-14: Convert & Copy Files With ‘dd’

  • dd if=test of=out conv=ucase
  • dd if=out of=new conv=lcase

Tutorial-15: Get Help, View Fancy Text & Reduce File Size

  • man
  • banner “bye bye”
  • compress -v test
  • uncompress test.z

builtin,
!,
%,
.,
:,
@,
{,
},
alias,
alloc,
bg,
bind,
bindkey,
break,
breaksw,
builtins,
case,
cd,
chdir,
command,
complete,
continue,
default,
dirs,
do,
done,
echo,
echotc,
elif,
else,
end,
endif,
endsw,
esac,
eval,
exec,
exit,
export,
false,
fc,
fg,
filetest,
fi,
for,
foreach,
getopts,
glob,
goto,
hash,
hashstat,
history,
hup,
if,
jobid,
jobs,
kill,
limit,
local,
log,
login,
logout,
ls-F,
nice,
nohup,
notify,
onintr,
popd,
printenv,
pushd,
pwd,
read,
readonly,
rehash,
repeat,
return,
sched,
set,
setenv,
settc,
setty,
setvar,
shift,
source,
stop,
suspend,
switch,
telltc,
test,
then,
time,
times,
trap,
true,
type,
ulimit,
umask,
unalias,
uncomplete,
unhash,
unlimit,
unset,
unsetenv,
until,
wait,
where,
which,
while

上一篇:入门python:《Python编程从入门到实践》中文PDF+英文PDF+代码学习


下一篇:使用NHibernate(8)-- 延迟加载