2015年6月4日

使用touch创建空文件以及修改文件的timestamp

摘要: touch filename如果一个文件存在,touch将更新与这个文件相关的所有timestamp到当前时间touch -a filename //只修改访问时间touch -m filename //只修改更新时间使用touch -d 可以指定timestamp,如:touch -d "Fr... 阅读全文

posted @ 2015-06-04 13:54 karenwang 阅读(323) 评论(0) 推荐(0) 编辑

如何查看和修改文件权限

摘要: 查看文件权限# ls -ltotal 59056-rw-r--r-- 1 root root 36 Jun 3 05:20 A.txt-rw-r--r-- 1 root root 27 Jun 3 05:20 B.txt-rw-r--r-- 1 root root ... 阅读全文

posted @ 2015-06-04 13:40 karenwang 阅读(7725) 评论(0) 推荐(0) 编辑

2015年6月2日

shell command cat/find/tr/mkdir

摘要: 1. cat cat is used to read, display, or concatenate the contents of a filecat file.txt //show the content of file.txt 显示file.txt中的内容cat file.txt... 阅读全文

posted @ 2015-06-02 13:54 karenwang 阅读(205) 评论(0) 推荐(0) 编辑

2015年6月1日

How to solve "/bin/sh^M:bad interpreter: No such file or directory"

摘要: 1. The issue is because windows and linux has different file system.2. Use vim to open the file3. Type :set ff?, you will see the text "fileformat=dos... 阅读全文

posted @ 2015-06-01 18:47 karenwang 阅读(131) 评论(0) 推荐(0) 编辑

2015年5月28日

Java中Volatile表示什么

摘要: Java中volatile修饰符是一种用来保证不同线程之间交互的特殊机制。当一个线程修改volatile变量,另一个线程能够看到这个修改。第一个线程通知第二个线程变量已经被修改。下面用图来解释:ready是一个volatile boolean变量, 初值设为false. answer是一个非vola... 阅读全文

posted @ 2015-05-28 23:00 karenwang 阅读(1638) 评论(0) 推荐(0) 编辑

导航