some commands for freebsd

一系统篇

1 环境变量:文件/etc/profile,
BLOCKSIZE=K; export BLOCKSIZE(通用)
文件~.cshrc BLOCKSIZE K
setenv
my cshrc
代理服务器的使用
HTTP 的代理: #setenv HTTP_PROXY http://proxyip:port
FTP 的代理: #setenv FTP_PROXY http://proxyip:port
2 下载文件
$fetch url
$wget url(下载文件缺省放在当前目录)
$wget -t0 -c -nH -np -b -m WRL -o wget.log (镜像)
3 进入单用户修改系统
boot -s
#mount -u /
#moutn -a
4 tar的使用
$tar zcvf temp.tar.gz temp/(创建备份文件)
$tar zxvf temp.tar.gz (解压备份文件)
$tar jcvf temp.tar.bz2 temp/(bz2压缩格式备份)
$tar jxvf temp.tar.bz2
5 grep的使用
$grep device temp 在temp文件中查找device,并打印所在行
$grep device * 在多个文件中查找device
$grep -R device 当前目录,包括子目录递归查找device

Related Posts

Leave Your Comments