Tag Archives: Linux

按照倒序排列查看 ls -trl 查看软件xxx安装内容 dpkg -L xxx 查找软件 apt-cache search 正则表达式 查找文件属于哪个包 dpkg -S filename          apt-file search filename 查询软件xxx依赖哪些包 apt-cache depends xxx 查询软件xxx被哪些包依赖 apt-cache rdepends xxx 增加一个光盘源 sudo apt-cdrom add 系统升级 sudo apt-get update       sudo apt-get upgrade       sudo apt-get … Continue reading

Posted in Linux | Tagged , | Leave a comment

解决用F-Secure SSH Client登录Linux时的乱码问题

在用F-Secure SSH Client登录Ubuntu Linux 8.04时,由于系统安装时采用的LANG=en_US.UTF8,命令的一些输出结果中会有乱码现象。 解决办法: 在.bashrc文件中增加如下一行: LANG=POSIX

Posted in Linux | Tagged , | Leave a comment

fixed the “C compiler cannot create executables” problem

run command below to fixed it

sudo apt-get install build-essential

Posted in Linux | Tagged , | Leave a comment

Linux的touch命令文件时间的指定方法

Linxu的touch命令用于改变系统中文件的时间。指定改变时间的方法有2种: 1. 使用-r选项,以系统中一个文件的时间指定。 2. 使用-t选项在,以[CC]YYMMDDhhmm[.s]的格式来指定。如199910011927.500

Posted in Linux | Tagged , | Leave a comment

chattr,lsattr

ext2以上版本中可以用chattr设置文件的一些附加属性。 可以用lsattr显示文件的附加属性。 指令格式:chattr [-RV][-v<版本编号>][+/-/=<属性>][文件或目录...] 属性列表如下:   a:让文件或目录仅供附加用途。  b:不更新文件或目录的最后存取时间。  c:将文件或目录压缩后存放。  d:将文件或目录排除在倾倒操作之外。  i:不得任意更动文件或目录。  s:保密性删除文件或目录。  S:即时更新文件或目录。  u:预防以外删除。

Posted in Linux | Tagged , | Leave a comment

htpasswd 命令

htpasswd 命令是用来维护Apache HTTP Server基本验证口令文件的命令。可以用来完成如下功能: 1. 创建口令文件并增加用户: htpasswd -c passwordfile  username 2. 修改已存在的口令文件: htpasswd -b passwordfile username password 3. 显示结果(不带口令):htpasswd -n username 4. 显示结果(带口令): htpasswd -nb username

Posted in Linux | Tagged , , | Leave a comment

source 命令

source, . 命令 在bash笔记第一部分中已经提到了source命令或.命令对脚本的执行方式与其他执行方式的不同指出: 在当前shell中运行, 影响当前shell的环境变量. 可以把”.”命令想象成C中的#include命令, 虽然它不直接将语句包含到脚本中, 但它会在当前shell中执行那些命令. 使用.命令可以将多个脚本合并起来, 整合进一些变量和函数.

Posted in Linux | Tagged , | Leave a comment