Tuesday, September 30, 2008

crontab 计划任务


$ crontab
crontab: usage error: file name must be specified for replace
crontab [-u user] file
crontab [-u user] { -e | -l | -r }
-e (edit user's crontab)
-l (list user's crontab)
-r (delete user's crontab)

输入crontab -e 编辑crontab 计划任务,Ubuntu里默认编辑器是Nano,如何使用Nano可以参考Nano 快捷键

# m h dom mon dow command
#分 时 日 月 周 执行命令

分钟[0,59],小时[0,23],日期[1,31] ,月[1,12],周[0,6],可以使用的参数有 “*”,“/”,“-”和“,”。

* 表示任意取值范围内数字 在分钟里*表示0到59的任意数字
- 表示选择区域范围内的数字 3-10表示3-10的任意数字,包含3和10
, 选择数字 2,4,5 选择2,4,5
/ 每多少数字 在分钟里 */2表示每二分钟



* * * * * command


3,15 * * * * command


3,15 8-11 * * * command


3,15 8-11 */2 * * command


3,15 8-11 * * 1 command

Firefox Ubiquity 命令大全

多媒体相关 Ubiquity 已经内置搜索 YouTube, Amazon, 以及 Flickr 的命令,以下几个命令用来搜索那些多媒体网站:
  • Last.FM - 搜索Last.FM 中的艺人页.
  • Seeq - 从Seeqpod 搜索音乐.
  • Vimeo - 从 Vimeo 搜索视频.
  • Stickam - 从任何网页实时收看你的 Stickam 上的朋友的视频.
  • Netflix Search - 从 Netflix 搜索电影.

目前,Ubiquity 只允许你同 Twitter 进行交互,以下命令允许你同更多社交网站交互
Ubiquity 默认支持 Digg,但以下命令允许你向 Reddit, Delicious, 以及其它相关网站提交书签或链接。
  • StumbleUpon - 发现你正在访问的页。需要 StumbleUpon extension 扩展。
  • Sphinn - 向 Sphinn 提交文章.
  • Reddit - 向 Reddit 提交链接。
  • Twine - 向 Twine 提交链接.
  • Delicious - 向你的 delicious 帐户提交书签以及标签.
  • Share On - 分享以下站点中的链接: Facebook, Reddit, Digg, Delicious, Slashdot, 或 Fark.
  • Most Popular on Delicious - 查看当前 delicious 中10大最受欢迎的书签.
  • Google Bookmark - 将当前网页提交给 Google Bookmarks.
  • Instapaper - 向你的 Instapaper account 帐户提交网页以便以后浏览.
  • Soup.io - 向你的 Soup.io 帐户提交链接.
  • Tumblr - 向 Tumblelog 提交共享链接.
  • Check Slashdot - 从 Slashdot 返回三篇最新文章,或者指定的任意文章。

Friday, September 19, 2008

Get a free college education online

Free online college courses


Grab some larnin' from the University of Washington's free online courses; Greek mythology, American Revolution, Heroic Fantasy are just some of the offerings. If you get tired of that, you can study economics at the University of Nebraska.

Teach yourself sign language from Michigan State University. Browse through the vast treasures at the Library of Congress. View free videos on all sorts of subjects from Annenberg Media, a major supplier to most distance learning universities, or read the core documents of American democracy.

Feel like a little light reading? You can study theology at Covenant Seminary; course offerings are delivered via a combo of free downloadable .pdf files and podcasts, and include subjects ranging from Church History to the Modern Reformation.

Learn mathematics with this extensive list of free online math courses from Whatcom Community College. Visit Carnegie Mellon University and take Biology, Causal Reasoning, Statistics, and more, all for free.


Penn State University offers a free Swedish language course, in addition to a free Hungarian language course. Or, you can take an Italian language and culture course from Brooklyn College. California State also offers a free Conversational Mandarin Chinese course, and you can learn Turkish via the University of Arizona.

The University of Washington School of Medicine offers free CPR classes online, complete with video and instructional guides. You can also take health courses from the Johns Hopkins Bloomberg School of Public Health; anything from adolescent health to population science.

Prepare for the US citizenship test from the Missouri Southern State University. Learn linear algebra from the University of Puget Sound. Learn about bioterrorism (really) and other hazards from the University of North Carolina.

Get free online mathematics textbooks, videos, and lecture notes from New York University. Take advantage of Tufts University's open courses on dentistry, medicine, nutrition, and more. Learn about cognitive science from Hampshire College.

Take eight different courses via the Sofia Project, a collaborative effort between select California community colleges. Brigham Young University offers independent study in subjects such as Family History, Family Life, and Religious Scripture Study. Get access to ten free seminary courses from Gordon-Conwell Theological Seminary.

Learn about human resources in 52 (!) different free courses from ERI. Browse a huge variety of materials in the University of Michigan's courses and seminars on Internet laws.

Ivy League

Take advantage of Stanford University's free CS education library. Go to college by taking free classes at MIT. Go to Berkeley with your iPod.The University of Pennsylvania has an extensive online library; over 25,000 books are listed here.


Just debuted, you can take free courses from Yale (funded by HP) on such diverse subjects as the Old Testament or Physics. Watch or read free online lectures in archival format from Princeton. Get a free Introduction to Probability text from Dartmouth.

Google tricks

Using the right keywords, find course syllabi (insert your own subject), lectures, tutorials, notes, podcasts, and various sorts of online books using Google.

As time goes on, I'm sure we'll see even more colleges and universities making even more of their courses open access. Got any other free online college courses or resources you'd like us to know about? Let us know your thoughts in the comments.

Display interface IP addresses

To display IP addresses assigned to router’s interfaces (excluding interfaces with no IP address) use show ip interface brief | exclude unassigned command.

Here is a sample printout:

C1#show ip int brief | excl unassigned
Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 YES NVRAM up up
Serial1/0 YES NVRAM up up
Loopback0 YES NVRAM up up
Tunnel0 YES manual up up

You could define an alias to create a new IOS command generating this printout, for example, alias exec ipconfig show ip interface brief | exclude unassigned.

Define new IOS commands with the alias functionality

Cisco IOS allows you to define aliases for the commands you commonly use with the alias global configuration command. The alias command accepts the CLI mode (exec, configuration ...) for the new command and the string that replaces the command name. If you specify additional parameters in the new command, they are appended to the alias string.

For example, if want to have the ipconfig command that displays interface IP configuration, you can configure
#alias exec ipconfig show ip interface

When you execute ipconfig ifname the alias is expanded into show ip interface ifname and displays the IP configuration of a single interface.

Tuesday, September 16, 2008

The Power Traveler's Checklist, Part One: Pre-Flight

The holiday travel season is just around the bend, meaning if you're planning to fly the friendly skies this Thanksgiving or Chrismukkah, you've either already bought your tickets or you're about to. But instead of following the time-honored holiday tradition of spending an arm and a leg on pricey tickets or frantically running through the airline terminal to catch your flight this year, follow these simple steps to ensure your trip is as inexpensive and relaxing as it is streamlined.

UPDATE: When you finish the pre-flight checklist, be sure to check out the travel day checklist to ensure you get where you're going on time.

Find the Best and/or Cheapest Tickets

Cheap tickets are the holy grail of travel, and there are millions of methods for finding them. If you've yet to buy your tickets, we've got a few pointers for making that purchase.

When it comes to shopping for a ticket, you've got tons of choices. Everyone and their reindeer want to help you find tickets (hell, even Google wants to get you to some cheap tickets), but your best and easiest bets are to either go directly to your airline of choice's web site or start looking for deals online using one of many travel search aggregators. Our favorite search aggregators are:

  • Kayak: Searches across other travel aggregators as well as directly from airlines for the best deal available. We've been big fans of Kayak's results for quite a while.
  • Farecast: Predicts the rise and fall of ticket prices with the intention of letting you know whether or not now is the right time to buy.
If you have a specific airline you want to fly—say, for example, you generally travel in and out of a hub—you can also find great deals going directly to the source. Head to your airline of choice's homepage and do a search there, or sign up to receive promotions and fare watches from the airline. This method won't always give you the best results—and it's not terribly efficient if you don't know what airline you want to travel—but it can be a great way to find deals. Of course everyone has their favorite methods, so check out how your fellow readers score cheap tickets for more.

Before you buy, here are a few other money-saving considerations to keep in mind:

  • Everyone wants to be with their families during the holidays, but if your family is flexible and you can travel on the actual holiday day (e.g., Thanksgiving day, Christmas day, or New Year's day), you can get incredible deals.
  • MileMaven: This web site lists frequent flyer promotions that could secure you a few bonus miles this trip.
  • You can sometimes find especially good deals between midnight and 1 a.m. (There's a bit of controversy over the veracity of this method, so your mileage may vary.)

Get the Best Seat on Your Flight

If you've started your search early enough, you can keep your comfort and other "luxury" factors in mind. For example:


  • You can find the best seats on the plane by factoring in your view of the in-flight movie screen, proximity to restrooms, and availability of power outlets with web site SeatGuru.
  • It's not as likely to work over the busy holiday travel season, but with a little booking ingenuity and luck you may be able to secure an empty seat next to you.
  • Look for tickets at a smaller nearby airport if possible—especially if you're traveling with kids —to make your flight more relaxing and pleasant. While this doesn't exactly apply to your seat on the plane, it can lower your stress level at the airport, making your seat seem that much better once you're in it.

Prepare Before Travel Day

You've booked your flight and your travel day is quickly approaching. From making sure you're correctly following packing guidelines to reserving a good parking spot, you've still got a few things to check off your list before the big day is here.

Packing smart and packing early ensures you'll have everything you need during your trip and you won't have to waste any time or money buying a new toothbrush when you land.

Now that you're all packed, you've just got a few more loose ends to take care of before travel day:
  • Unless you're getting dropped off at the airport (either by a friend or shuttle), make reservations with an airport parking lot. If you don't have a favorite, try out web site AirportParkingReservations for a customer-rated list of lots near your airport.
  • If you are planning to get dropped off at the airport, be sure you've made the necessary arrangements—either talk to (and continually remind) the friend who's dropping you off or make reservations with the shuttle service.
  • Put your airline on speed dial or add it as a new contact so you're first to rebook if your flight gets canceled. On a tight travel day, this preparation can mean the difference between rebooking a new flight 45 minutes later versus tomorrow.
  • Also, if you're planning to take Spot or Tabby along on your trip, be sure you know how to fly safely with a pet.
Finally, if your flight is leaving early the next day, go to your airline's web site to check in and print your boarding passes. Having already checked in and holding your boarding pass before you even get to the airport saves tons of time, especially if you're not checking any luggage.

Tune in next week for the Power Traveler's Checklist, Part Two: Travel Time. UPDATE: Tackle your travel day to-dos here. I'm sure you've got tons of pre-flight items on your checklist, so please share them in the comments.

30 余款完全合法而免费获得音乐的网站资源

Unsigned Band Web
Soundclick's music page
Garage Band
Indie Rock Cafe
The Internet Archive
Free Children's Music
Classic Cat

Tuesday, September 9, 2008

Firefox Ubiquity 命令大全

  • Last.FM - 搜索Last.FM 中的艺人页.
  • Seeq - 从Seeqpod 搜索音乐.
  • Vimeo - 从 Vimeo 搜索视频.
  • Stickam - 从任何网页实时收看你的 Stickam 上的朋友的视频.
  • Netflix Search - 从 Netflix 搜索电影.

目前,Ubiquity 只允许你同 Twitter 进行交互,以下命令允许你同更多社交网站交互
Ubiquity 默认支持 Digg,但以下命令允许你向 Reddit, Delicious, 以及其它相关网站提交书签或链接。
  • StumbleUpon - 发现你正在访问的页。需要 StumbleUpon extension 扩展。
  • Sphinn - 向 Sphinn 提交文章.
  • Reddit - 向 Reddit 提交链接。
  • Twine - 向 Twine 提交链接.
  • Delicious - 向你的 delicious 帐户提交书签以及标签.
  • Share On - 分享以下站点中的链接: Facebook, Reddit, Digg, Delicious, Slashdot, 或 Fark.
  • Most Popular on Delicious - 查看当前 delicious 中10大最受欢迎的书签.
  • Google Bookmark - 将当前网页提交给 Google Bookmarks.
  • Instapaper - 向你的 Instapaper account 帐户提交网页以便以后浏览.
  • Soup.io - 向你的 Soup.io 帐户提交链接.
  • Tumblr - 向 Tumblelog 提交共享链接.
  • Check Slashdot - 从 Slashdot 返回三篇最新文章,或者指定的任意文章。

Monday, September 8, 2008


  1. 更加全面地用Google搜索的最好方式是点击高级搜索。
  2. 它可以让你搜索更加精准的词组,“所有词组”或者是适当的搜索框里输入词组的某一个特定关键词。
  3. 在高级搜索里你依然可以自定义在一张页面上展示多少个搜索结果,你所寻找的信息语言和文件格式。
  4. “搜索以下网站或网域”可以让你通过输入一个顶级域名(如.co.uk)来限定搜索结果。
  5. 你也可以点击“日期、使用权限、数字范围和更多”的链接以获取更高级的功能。(Google中文直接分条在页面展示。)
  6. 保存设置,这些高级功能大多也可以在Google首页的搜索框中通过命令行参数来实现
  7. Google的主要搜索可以无形地用布尔结构“AND”来结合。你当输入smoke fire - 它表示寻找smoke AND fire.
  8. 要让Google搜索Smoke 或者fire,只需要输入smoke OR fire.
  9. 你也可以用 | 来代替OR。如:smoke | fire.
  10. 像AND 和 OR 这样的布尔结构对大小写非常敏感。他们必须是全部大写。
  11. 搜索专有名词,然后输入用括号括住的一个或者几个关键词。比如water (smoke OR fire)
  12. 寻找短语,可以把它们放在引号里。比如:"there’s no smoke without fire"。
  13. 同义搜索来寻找那些类似的信息,只须在你的关键词臆加一根波浪线,比如:~eggplant.
  14. 用减号来排除关键词,如:new pram -ebay 可以让搜索结果排除来自Ebay的婴儿车信息。
  15. 像 I, and, then ,if 这类普通词语是要被Google 忽略的。他们被称作停滞词语。
  16. 而加号却可以让这些停滞词语给包含进来,比如:fish +and chips.
  17. 如果一个停滞词语被包含在那些作为短语的引用标记中间的句子中时,这些词语是被Google允许的。
  18. 你也可以要求Google进行简省搜索,试一下:Christopher Columbus discovered *
  19. 用数字范围功能来搜索数字范围。例如:搜索价位在300英到500英磅之间的索尼电视可以用以下字串:Sony TV £300..£500。
  20. 通过高级搜索Google认可13种主要文件格式,其中包括Office, Lotus, PostScript, Shockwave Flash 和text。
  21. 搜索这些文件只需直接使用修饰符 filetype:[文件扩展名]。例如:soccer filetype:pdf.
  22. 要排除整个文件格式,只需使用以前我们排除关键词时使用的相同布尔句法:橄榄球 -filetype:doc
  23. 事实上,只要你的语法正确,你可以混合使用任何布尔搜索运算符。举个例子便是:"sausage and mash" -onions filetype:doc
  24. Google也有很多功能强大却隐藏着的搜索参数,例如“intitle” 仅仅只会搜索网页标题(titles).你可以用这个例子试一试:intitle:网页设计
  25. 如果你只是寻找文件而不是网页,只需用index of 代替intitle:参数。它可以帮助你寻找网络和FTP目录。
  26. inurl这个修饰语只会搜索网页的网址,不妨用这个例子试一试 inurl:spices
  27. 通过 inurl:vien/view.shtml 你可以找到在线的网络摄像头。
  28. inanchor这个修饰语非常特别,它仅仅只会寻找那些作为超链接的文本。
  29. 想知道有多少链接指向一个网站。可以试试这个语法:link:网址 - 比如link:www.mozilla.org
  30. 同样的,你也可以通过 related:修饰语来找到Google认为相似的内容。比如: related:www.microsoft.com
  31. info:site_name 这个修饰语可以返回关于某特定页面的信息。
  32. 同样的,在普通搜索后点击"相似网页"可以链接到Google认为相似的页面结果。
  33. 如果只想搜索某一个风址里的内容,可能用site: 来实现,比如说search tips site:www.techradar.com.
  34. 上述技巧通过像www.dmoz.org这样的目录网站并动态地生成网址。
  35. 也可直接进入Google Directory这样的人工挑选出来的数量有限的数据库网站,网址是www.direcory.google.com。
  36. intitle和inurl这样的布尔运算符像OR一样在Google Directory中同样适用。
  37. 当你用Google图片搜索时,用site:的修饰语可以只搜索某一个网站内的图片,比如 dvd recorder site:www.amazon.co.uk。
  38. 同样的,用"site:.com"只会返回带有.com域名后缀网站里的结果。
  39. Google新闻(news.google.com)有他自己的布尔运算符。例如“intext” 只会从一条新闻的主体内容里查询结果。
  40. 在Google新闻里如果你用“source:”这个运算符,你可以得到特定的新闻存档。比如:heather mills source:daily_mail
  41. 通过"location:"过滤器你可以等到特定国家的新闻,比如 location:uk
  42. 同样的Google博客搜索(blogsearch.google.com)也有它自己的句法。你可以搜索某篇日志的标题,比如 "inblogtitle:"
  43. Google的普通搜索也可以确实也可以得到精确的结果,不如用"movie:" 来寻找电影评论。
  44. “film:”修饰语效果也一样。
  45. 在搜索框里输入上映时间,Google会提示你提交你的邮编,然后Google就会告诉你什么时候什么地方将会有好戏上演。
  46. 如果想要一个专门的电影搜索页面,可以去www.google.co.uk/movies
  47. 如果你圈选了“记住地点”后,下次你查询电影放映时间只需要输入电影名字就够了。
  48. Google确实在电影方面的搜索上下了些功夫。比如在搜索框中输入“director:<电影名>”你将得到什么结果?你肯定猜到了吧。
  49. 如果想得到演员名单,如需输入“cast:name_of_film”
  50. 在乐队名、歌曲名或者专辑名前加上“music:”可以得到相关的音乐信息和评论。
  51. 如果你在搜索框里输入“weather London”便可以得到伦敦最近四天完整的天气预报。
  52. Google也内置了词典,在搜索框里用"define:the_word"试试。
  53. Goolge保存了网站过去的内容。你可以直接搜索某个页面在Google服务器里的缓存,相关句法是“keyword cache:site_url”
  54. 相应的,直接在搜索框里输入“cache:site_url”可以直接进入缓存页面。
  55. 如果你手边没有计算器,只要记住Google同样内置了这么一个功能。输入“12*15”然后点击搜索试试。
  56. Google的内置计算器不但可以转换尺寸还可以理解自然语言。搜索一下“14 stones in kilos”
  57. 汇率转换也同样适用,试试“200 pounds in euros”
  58. 如果你知道某货币的代码,将得到更加可靠的结果,例如"200 GBR in EUR"
  59. 温度呢?Google也没有放过,输入“98 f to c”便可以把华氏转换为摄氏。
  60. 想知道Google到底有多聪明呢?输入“2476 in roman numerals”然后点击“搜索”就知道了。
  61. 你也可以保存你的Google使用习惯偏好,只需要在www.google.com/account上注册一个帐号便可。
  62. 一旦有了Google帐号,不旦可以免费获得一个Gmail帐号,最主要的是可以畅通无阻地遨游于Google的世界。
  63. 登陆你的Google帐户,通过“iGoogle”你还可以个性化你的Google主页。
  64. 在“iGoogle”上点击”Add a Tab”来添加多个内容模块,Google会根据你添加的甩有模块来自适应整个页面。
  65. “iGoogle”允许你为主页更换模板,点击”Select Theme”便可改变现有的默认主题。
  66. 有一些”iGoogle”主题会随着时间的改变而改变,比如”Sweet Dreams”就是一个随着白天到夜晚的更迭而改变的一款主题。
  67. 点击”Try something new” 下面的”More” 就可以看到一个更加完整的Google网站列表和一些新的功能。
  68. “Custom Search”帮助你为你自己的网站建立一个Google牌的搜索引擎。
  69. 另外,那张列表还忘掉了一个很有用的服务“Personalised Search”,不过你可以通过访问www.google.com/psearch来使用它。(一个保存你搜索记录的服务——译者注)
  70. 这个页面列出了你最近的搜索,并按特定分类来区分他们,点击”pause” 就可以阻止Google记录你的搜索历史。
  71. 点击”Trends”可以看到你最访问的网站,你最搜索最多的条目以及最常点击的链接。
  72. 个性化搜索同样包括了一个书签服务,它帮助你在线保存书签并可以在任何地方获取他们。
  73. 更方便的是,你可以在”iGoogle”上添加一个书签模块来添加或访问它们。
  74. 你知道你还可以搜索Google返回的结果么?滑到搜索结果页面底部便可以找到那链接。
  75. 在你的查询后面附加你的邮编便可以搜索本地信息。
  76. 找地图?只需要在搜索关键词后面多写一个”map”,比如“Leeds map”
  77. Google搜索图片(这里指直接在Google首页而不是Google Map页面,译者注)非常简单,只要你在关键词后而多写个“image”,你就会在搜索结果的顶部看到相关的图片结果。
  78. 神奇的是Google图片搜索可以识别人脸,在浏览器地址栏搜索结果页面网址后面添加“&imgtype=face” 确定后Google会过滤掉所有不是人的图片。
  79. 想关注股市行情?只需要在”stock:”后面填上公司的股票代码便可以得到从Google财经返回的结果。
  80. 在Google的搜索框中输入航空公司或者航班号可以获得相关的航班信息。
  81. 现在几点了?在地点前面加上“time”可以得到任务地方的时间。
  82. 你也许已经注意到了在输入关键词时Google会交替提示你的拼写,那内置的拼写检查在起作用。
  83. 你可以在关键词前加上”spell:”来直接调用Google的拼写检查功能。
  84. 点击”I’m Feeling Lucky” (手气不错)可以直接访问关键词搜索第一个结果的网页。
  85. 输入基于统计的查询关键词,比如population of Britain,在结果顶部Google会告诉你它的答案。
  86. 如果你看到的搜索有非英文结果,点击”Translate this Page” 可以看到由Google帮你翻译的英文内容。
  87. 你也可以搜索国外网站的内容,点击语言工具,然后选择你想要Google帮你翻译查询的国家。
  88. 语言工具的另一个特色是可以帮你翻译一些可自由剪贴的文本字块。
  89. 这里也有一个区域,你可以直接输入网址,并让Google翻译成你想要的语言。
  90. 在“语言工具”链接上面你可以看到一个“使用偏好”的链接,这是一个包含了一些私密设置的页面。
  91. 你可以明确地告诉Google你希望返回结果的语言,可根据你的喜好进行多选。
  92. Google的安全搜索可以保护你免受色情内容的侵犯。你可以选择性的让过滤系统更加严格或者把它完全地关闭。
  93. 在使用偏好里,你可以改变Google搜索单页显示结果的结果数,默认为10.
  94. 你也可以设置为在新窗口打开Google的搜索结果。
  95. 想知道他人在搜索的内容或者提高你自己网站的Pagerank值(Google自行开发的网页质量等级排名评估算法,Pagerank值越高的网页在搜索结果里越靠前,译者注)?去www.google.com/zeitgeist看看。
  96. 另一个强大的实验性功能可以在www.google.com/trends找到,你可以知道哪些是热门搜索条目。
  97. 在Google趋势搜索框里输入以逗号间隔的多个关键词,可以对比他们的搜索表现。
  98. 想用克林贡语搜索?去www.google.com/intl/xx-klingon就可以了。
  99. 也许你提线木偶里的瑞典厨师是你的榜样?点击www.google.com/intl/xx-bork看看。
  100. 在搜索框里输入“answer to life, the universe and everything”,你肯定会被结果吓一跳。
  101. Google还可以告诉你独角兽有多少只角,(够搞笑吧)。输入“number of horns on a unicorn”看看。