6/6 紀錄


Linux Crontab ¶

其實根本沒有要打甚麼教學,僅僅是紀錄一些指令罷了

sudo service cron status
sudo service cron start
sudo service cron stop
crontab -l
vim crontab

crontab -e
# Example of job definition:
# .---------------- minute (0 - 59)
# |  .------------- hour (0 - 23)
# |  |  .---------- day of month (1 - 31)
# |  |  |  .------- month (1 - 12) OR jan,feb,mar,apr ...
# |  |  |  |  .---- day of week (0 - 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat
# |  |  |  |  |
# *  *  *  *  * user-name  command to be executed
# 每分鐘執行 index.php 一次
* * * * * php index.php

強力推薦 ¶

Linux大神,鳥哥的教學


Other Command ¶

cd -

就是回到剛剛的資料夾

假設原本在 /home/frank

下了指令 cd /etc

跑到 /etc 了

再下指令 cd -

就回到 /home/frank

ps aux

可搭配 grep

ps aux | grep php


最近聯絡到好久不見的朋友了,雖然她還在美國,聊了一下天感覺還是不錯低