All posts by ht

Kill the annoying "downloading" process

If you failed at download one package in “apt-get install” commands. it’ll keep downloading it if you run “apt-get install” next time. it is really annoying.
you should kill the downloading process by check string related in the following dir or files:
“/usr/share/package-data-downloads/”
“/var/lib/update-notifier/package-data-downloads/”
“/usr/share/update-notifier/package-data-downloads-failed”
“/var/lib/update-notifier/user.d/data-downloads-failed”
“/usr/share/update-notifier/package-data-downloads-failed-permanently”
“/var/lib/update-notifier/user.d/data-downloads-failed-permanently”
and deleted the string or file related.
 

emacs editor

emacs file.txt 创建或查看file.txt
帮助——Ctrl+h
中止——Ctrl+g
移动——Ctrl+b, Ctrl+n, Ctrl+f, Ctrl+p (左,下,右,上)
删除字符——Ctrl+d
删除行——Ctrl+k
到达行首,到达行尾——Ctrl+a,Ctrl+e
停止——Ctrl+x,Ctrl+c
另存为——Ctrl+x,Ctrl+w
保存文件——Ctrl+x,Ctrl+s
向前搜索,向后搜索——Ctrl+r,Ctrl+s
启动指南——Ctrl+h,t
撤销——Ctrl+x,u

vi editor

vi file.txt: 创建或查看file.txt; 按i插入文本,按a添加文本。
光标移动——h、j、k、l(左、下、上、右)
删除字符——x
删除行——dd
模式切换——esc
退出不保存——:q!
强制推出并保存——:wq!
文本搜索——/

(Parameters) Auto mount NTFS in Ubuntu

Identy the partition table using: sudo fdisk -l
Identy the partition UUID using: sudo blkid
Add the codes below in: /etc/fstab

# change the "UUID" to your partition UUID
UUID=12102C02102CEB83 /media/windows ntfs-3g auto,users,permissions 0 0 

Make a mount point (if needed)

sudo mkdir /media/windows 

Now mount the partition

mount /media/windows 

The options I gave you, auto, will automatically mount the partition when you boot and users allows users to mount and umount .
You can then use chown and chmod on the ntfs partition.
 
or:
sudo apt-get install ntfs-config