One-line command reference

[olcr]

5 ดิสโทรที่เปลี่ยนวงการลินุกซ์

Linux

  1. Slackware (1993) ลินุกซ์ตัวแรกที่ได้รับความนิยมอย่างแท้จริง
  2. Debian (1994) รู้จักคำว่า Community
  3. Caldera (1993/4) ผลักดันสู่แวดวงธุรกิจ
  4. Red Hat Enterprise Linux 2.1AS (2002) ประกาศเป็นลินุกซ์สำหรับธุรกิจเต็มรูปแบบ
  5. Ubuntu 4.10 (2004) ลินุกซ์เพื่อทุกๆ คน
อ่านต่อ : http://www.linux-mag.com/id/7651/2/

Filed under  //   distribution   linux  

Android บน TV?

69033_650x695

MIPS Technologies ประกาศในงาน CES(Consumer Electronics Show) ที่ลาสเวกัสเมื่อวันพุธที่ผ่านมาว่า บริษัทมีแผนการที่จะนำ Android มารันบน TV 

อ่านต่อ : http://www.linuxinsider.com/rsstory/69039.html

Filed under  //   android   ces   tv  

ค้นหาไฟล์

ค้นหาไฟล์ที่มีนามสกุล .rar ใน /dos/document

Command:
$ find /dos/document -name \*.rar

Result:
/dos/document/xbmc/xbmc_libraries.rar
/dos/document/asterisk/184719446X.rar
/dos/document/xbmc-plugin/Plugin-tutorial.rar

Filed under  //   find  

ดูว่าคำที่ระบุอยู่ในไฟล์ไหนบ้าง

คำว่า import อยู่ในไฟล์ไหนบ้าง (ภายใต้โฟลเดอร์ public)

Command:
$ grep -n -H -r "import" /dos/smallapps2/console/public/

Result:
/dos/smallapps2/console/public/main.py:1:import sys
/dos/smallapps2/console/public/main.py:2:from PyQt4 import QtCore, QtGui
/dos/smallapps2/console/public/main.py:3:from console_ui import Ui_Dialog
/dos/smallapps2/console/public/main.py:5:import urllib
/dos/smallapps2/console/public/main.py:6:import httplib2
/dos/smallapps2/console/public/main.py:7:from base64 import b64encode
/dos/smallapps2/console/public/console_ui.py:10:from PyQt4 import QtCore, QtGui
/dos/smallapps2/console/public/main.py~:1:import sys
/dos/smallapps2/console/public/main.py~:2:from PyQt4 import QtCore, QtGui
/dos/smallapps2/console/public/main.py~:3:from console_ui import Ui_Dialog
/dos/smallapps2/console/public/main.py~:5:import urllib
/dos/smallapps2/console/public/main.py~:6:import httplib2
/dos/smallapps2/console/public/main.py~:7:from base64 import b64encode

Filed under  //   grep  

โค้ดสำหรับโพสข้อความมายัง command.posterous.com

เป็นภาษา Python ตัว Gui เป็น TkInter ใช้บน Linux เท่านั้น ในโปรแกรมจะมีช่องให้กรอกคำสั่ง(ใส่คำสั่งได้บรรทัดเดียว) ผลลัพท์ของคำสั่งจะถูกประมวลผลและอัปมายัง posterous อัตโนมัติ (รูปแบบของข้อความจะเหมือนในเว็บนี้)

Click here to download:
posterous.py (1 KB)

Click here to download:
gui.py (1 KB)

Filed under  //   code   source  

Access unicode characters by name

Command:
-----------------------------------------------------------------------------------
$ python -c "print u'\N{euro sign}'"

Filed under  //   python  

Redirect stdout & stderr to file

Command:
-----------------------------------------------------------------------------------
$ ls -al > /tm/output.txt 2> /tmp/error.txt

Find sumation from each line

Sum number in input.txt

Command:
-----------------------------------------------------------------------------------
$ cat /dos/implement/euler/c13/input.txt | tr "\n" "+" | sed 's/+$/\n/' | bc

Result:
-----------------------------------------------------------------------------------
5537376230390876637302048746832985971773659831892672

Filed under  //   bc   cat   sed   tr  

Limiting the replace

Replace old with new from line 40 through 42

Command:
--------------------------------------------------------------------------------
$ :40,42 s/old/new/g

Filed under  //   vi  

Finding all file that start with '.' (period)

Command:
--------------------------------------------------------------------------------
$ ls -A $HOME | grep -E "^\.\.*"

Result:
--------------------------------------------------------------------------------
.account.del
.adobe
.appcfg_nag
.bash_history
.bash_logout
.bashrc
.BloGTK
.boxee
.bzr.log
.cache
.checkbox
.compiz
.config
.cpan
.dbus
.d-feet
.dmrc
.emacs.d
.eric4
.esd_auth
.evolution
.face
.flickr
.fontconfig
.gconf
.gconfd
.gdesklets
.gegl-0.0
.gimp-2.6
.gksu.lock
.gnome2
.gnome2_private
.gnupg
.google
.gpilotd
.gpilotd.pid
.gstreamer-0.10
.gtk-bookmarks
.gtkrc-2.0-kde4
.gtwitter
.guvcviewrc
.gvfs
.gvimrc
.ICEauthority
.icons
.idlerc
.irssi
.kbluetooth4
.kchmviewer
.kde
.kiki
.local
.lyrics
.macromedia
.miro
.mozilla
.mplayer
.mysql_history
.nautilus
.nbi
.netbeans
.netbeans-registration
.openoffice.org
.opera
.perlconsole_history
.pida2
.pki
.profile
.pulse
.pulse-cookie
.purple
.pycrust
.pyhistory
.pype
.pyshell
.python-eggs
.qlive
.qt
.recently-used
.recently-used.xbel
.recently-used.xbel.4964ZU
.recently-used.xbel.9OWN0U
.recently-used.xbel.FZ6PZU
.recently-used.xbel.LVZTZU
.recently-used.xbel.OOPN0U
.recently-used.xbel.YL56XU
.rpdb2_settings
.screen-profiles
.screenrc
.sflphone
.Skype
.smb
.songbird2
.spe
.ssh
.subversion
.sudo_as_admin_successful
.synaptic
.themes
.thumbnails
.tilda
.tomboy
.tomboy.log
.torcs
.Torrents
.tsclient
.update-manager-core
.update-notifier
.viminfo
.vimrc
.virc
.VirtualBox
.wapi
.wine
.winpdb_settings.cfg
.wireshark
.Xauthority
.xbmc
.xchm
.xine
.xrced
.xsession-errors

Filed under  //   grep   ls