顯示具有 Linux 標籤的文章。 顯示所有文章
顯示具有 Linux 標籤的文章。 顯示所有文章

2012年3月15日 星期四

Display access change modify time in FreeBSD

http://www.cyberciti.biz/faq/howto-finding-files-by-date/
Each file has three time stamps, which record the last time that certain operations were performed on the file:

[a] access (read the file's contents) - atime

[b] change the status (modify the file or its attributes) - ctime

[c] modify (change the file's contents) - mtime

http://www.cyberciti.biz/tips/display-file-or-file-system-status.html

stat

-f
%N Displays the name of file.
%n new line
%t tab

-t timespec

stat -f "%N%n%tAccess: %Sa%n%tModify: %Sm%n%tChange: %Sc" -t "%Y-%m-%d %H:%M:%S" ./*

2011年12月20日 星期二

用gdb解決core dumped

在FreeBSD上執行程式./a.out出錯了 Segmentation fault (core dumped)

產生了副檔名為core的檔案: a.out.core

別急著在程式碼中插入print再compile

先試試這個:

gdb a.out a.out.core

詳細用法:

進階gdb
multi-thread與multi-process除錯
http://www.study-area.org/cyril/opentools/opentools/x1265.html

基本gdb
http://www.study-area.org/cyril/opentools/opentools/x1253.html