Top 100 Recent Topics
-
How To Let Ubuntu Use DHCP
(Not setting up DHCP server)sudo vim /etc/network/interfaces auto eth0 iface eth0 inet dhcpsudo /etc/init.d/networking restart
Posted Jul 13, 2009 3:26 AM by Leo - www.superarts.org -
-
About Ubuntu's "Backports"
以前一直没留意这个功能,其实是很有用的。Ubuntu的升级方式是,对每一个大版本(如8.04),所有软件都会停在一个版本上,更新只包括一些漏洞的修正;这样是为了保护系统的稳定,但是如果你很喜欢的一个软件升级了,这个升级又正好是你需要的(比如Pidgin对QQ群的支持,Tilda对黑屏bug的修正,等等),那你就需要enable backports repository了。具体做法很简单,虽然官方解释很复杂,但其实在software sources里单纯地启用和禁用backprots就可以。(官方解释:https://help.ubuntu.com/community/UbuntuBackports) ...
Posted Oct 18, 2008 9:41 AM by Leo - www.superarts.org -
-
Batch Extract
for tar in *.tar.gz;do tar zxvf $tar;done
Posted Oct 9, 2008 9:18 PM by Leo - www.superarts.org -
-
递归删除subversion下的.svn目录的命令
#!/bin/bashfind $1 -name ".svn" -depth -exec rm -rf {} \;
Posted Aug 28, 2008 9:29 AM by Leo - www.superarts.org -
-
命令行多线程下载
#!/bin/bashlfpt -c "pget -n 10 $1"
Posted Aug 25, 2008 11:42 PM by Leo - www.superarts.org -
-
添加PATH
export PATH="$PATH:/new/path"
Posted Aug 25, 2008 11:41 PM by Leo - www.superarts.org -
-
php遍历目录下所有文件,含子目录
function get_all_files( $path ){ $list = array(); foreach( glob( $path . '/*') as $item ){ if( is_dir( $item ) ){ $list = array_merge( $list , get_all_files( $item ) ); } else{ $list[] = $item; } } return $list;}
Posted Aug 25, 2008 11:55 AM by Leo - www.superarts.org -
-
wget下载整个网站
可以使用下面的命令 wget -r -p -k -np http://hi.baidu.com/phps , -r 表示递归下载,会下载所有的链接,不过要注意的是,不要单独使用这个参数,因为如果你要下载的网站也有别的网站的链接,wget也会把别的网站的东西下载 下来,由于互联网的特性,很有可能你会把整个互联网给下载下来 --,所以要加上 -np这个参数,表示不下载别的站点的链接. -k表示将下载的网页里的链接修改为本地链接.-p获得所以显示网页所需的元素,比如图片什么的.另外还有其他的一些参数可以使用:-c表示断点续传-t ...
Posted Aug 25, 2008 7:54 AM by Leo - www.superarts.org -
-
外接显示器双屏显示的方法
在终端下输入命令: sudo dpkg-reconfigure -phigh xserver-xorg 运行该命令后会自动对
/etc/X11/xorg.conf
的文件进行backup,备份文件为加上当时时间为文件的后缀,如果将来有需要的可以恢复回去的.至此,在我的机器上面外接显示器基本上完成了,剩下的就
只是利用命令来对显示的效果进行控制了.
xrandr --output VGA --off(auto) :这个命令是关闭(开启)外接的显示器.
xrandr --output LVDS ...
Posted Aug 16, 2008 11:33 PM by Leo - www.superarts.org -
|
posted Jul 13, 2009 3:25 AM by Leo - www.superarts.org -
(Not setting up DHCP server)
sudo vim /etc/network/interfaces auto eth0
iface eth0 inet dhcp
sudo /etc/init.d/networking restart |
posted Oct 18, 2008 9:34 AM by Leo - www.superarts.org -
以前一直没留意这个功能,其实是很有用的。Ubuntu的升级方式是,对每一个大版本(如8.04),所有软件都会停在一个版本上,更新只包括一些漏洞的修正;这样是为了保护系统的稳定,但是如果你很喜欢的一个软件升级了,这个升级又正好是你需要的(比如Pidgin对QQ群的支持,Tilda对黑屏bug的修正,等等),那你就需要enable backports repository了。具体做法很简单,虽然官方解释很复杂,但其实在software sources里单纯地启用和禁用backprots就可以。 (官方解释: https://help.ubuntu.com/community/UbuntuBackports) 以前我错误地使用了下载deb包的形式,显然这就丧失了apt本来的便利性。BTW,download & build from source对于大多数人来说都缺乏必要的头文件什么的,还是用包管理最方便。实在要享受本地build的好处,apt也可以做到的。请参考相关内容。 |
posted Oct 9, 2008 9:18 PM by Leo - www.superarts.org -
for tar in *.tar.gz;do tar zxvf $tar;done |
posted Aug 28, 2008 9:26 AM by Leo - www.superarts.org -
#!/bin/bash find $1 -name ".svn" -depth -exec rm -rf {} \; |
posted Aug 25, 2008 11:41 PM by Leo - www.superarts.org -
| #!/bin/bash lfpt -c "pget -n 10 $1" |
posted Aug 25, 2008 11:40 PM by Leo - www.superarts.org -
| export PATH="$PATH:/new/path" |
posted Aug 25, 2008 11:54 AM by Leo - www.superarts.org -
function get_all_files( $path ){ $list = array(); foreach( glob( $path . '/*') as $item ){ if( is_dir( $item ) ){ $list = array_merge( $list , get_all_files( $item ) ); } else{ $list[] = $item; } } return $list; } |
posted Aug 25, 2008 7:53 AM by Leo - www.superarts.org -
可以使用下面的命令 wget -r -p -k -np http://hi.baidu.com/phps , -r 表示递归下载,会下载所有的链接,不过要注意的是,不要单独使用这个参数,因为如果你要下载的网站也有别的网站的链接,wget也会把别的网站的东西下载 下来,由于互联网的特性,很有可能你会把整个互联网给下载下来 --,所以要加上 -np这个参数,表示不下载别的站点的链接. -k表示将下载的网页里的链接修改为本地链接.-p获得所以显示网页所需的元素,比如图片什么的.
另外还有其他的一些参数可以使用: -c表示断点续传 -t 100表示重试100次,-t 0表示无穷次重试 --reject=avi,rmvb 表示不下载avi,rmvb的文件,--accept=jpg,jpeg,表示只下载jpg,jpeg的文件.
另外可以将要下载的url写到一个文件中,每个url一行,使用这样的命令 wget -i download.txt.
可以在用户目录下建立一个.wgetrc的文件(windows里面好像不能直接建立这样的文件,windows会认为没有文件名--),里面写上 http-proxy = 123.456.78.9:80,然后在加上参数 --proxy=on,如果需要密码,再加上下面的参数 --proxy-user=username, --proxy-passwd=password |
posted Aug 16, 2008 11:32 PM by Leo - www.superarts.org -
| 在终端下输入命令: sudo dpkg-reconfigure -phigh xserver-xorg 运行该命令后会自动对
/etc/X11/xorg.conf
的文件进行backup,备份文件为加上当时时间为文件的后缀,如果将来有需要的可以恢复回去的.至此,在我的机器上面外接显示器基本上完成了,剩下的就
只是利用命令来对显示的效果进行控制了.
xrandr --output VGA --off(auto) :这个命令是关闭(开启)外接的显示器.
xrandr --output LVDS --off(auto) :这个命令是关闭(开启)本本的显示器.
xrandr --output VGA --auto --right-of LVDS
:这个命令是令外接的VGA显示器扩展到本本的屏幕的右边,与windows下的扩展的效果是一样的.但要注意一点的就是要想外接的显示器扩展到本本屏幕
的右边必须是外接的显示器的分辨率比本本屏幕的低,否则就变成分辨率低的成扩展,无论你的命令是什么! |
|