Showing posts with label Linux 指令. Show all posts
Showing posts with label Linux 指令. Show all posts

Saturday, January 19, 2013

grep + find example 範例

find ./ -name \*.py -exec grep -wl nltk {} \;

Find all the files which contain 'nltk' in their content in current directory.

找出當前目錄下所有內容含有'nltk'這個字的python檔案


Ubuntu linux cat 指令合併檔案


用法:

cat file.01 file.02 file.03 > file.merge
(將 file.01  file.02  file.03 合併到 file.merge)

另外,如果要合併的檔名有空白字元的話,那就要檔名前後加上 " "

cat "arthur today.001"  "arthur today.001"  "arthur today.004" > arthurtoday.avi



Reference:
http://www.arthurtoday.com/2010/10/ubuntu-linux.html