环境变量配置出错了cd -- 进入用户目录vim .bash_profile删除以前PATH这一行,把下面的粘帖进去PATH=$PATH:$HOME/bin:/root:/root/snapshot/:/usr/local/mysql/bin/:/bin 然后执行 source .bash_profile然后就可以使用了 etc/profile:此文件为系统的每个用户设置环境信息,当用户第一次登录时,该文件被执行.并从/etc/profile.d目录的配置文件中搜集shell的设置./etc/b…
一.系统环境 Fedora10 二.出错情况 执行ls命令出现如下错误提示: CMake Error: The source directory "/etc/--color=auto" does not exist.Specify --help for usage, or press the help button on the CMake GUI. 三.错误原因 我出现该错误的原因是在/usr/local/bin目录下有一个ls命令(我也不知道为什么会多了一个ls命令,可能是安装一些…
在Linux下执行svn add *时出现如下错误: svn:  Valid UTF-8  data(hex: 4b)followed by invalid UTF-8 sequence(hex:  fc 63 68  65) 出现这个错误是因为svn库里有文件的名字不是utf-8编码的,这种情况对于中文来说很常见.比如在自己的windows上建了一个中文名字的文件,就会使这种情况. 几经周折,才找到解决办法: 首先,执行命令: ls * | file -/dev/stdin:  ISO-885…
基本实现了Linux下的ls -l命令,对于不同的文件显示不同的颜色和显示符号链接暂时没有实现: /************************************************************************* > File Name: dirwalk.c > Author: > Mail: > Created Time: Tue 31 Mar 2015 11:56:38 AM CST ******************************…
linux下执行.sh文件的方法    .sh文件就是文本文件,如果要执行,需要使用chmod a+x xxx.sh来给可执行权限.       是bash脚本么   可以用touch test.sh #创建test.sh文件   vi test.sh #编辑test.sh文件   加入内容   #!/bin/bash   mkdir test   保存退出.   chmod a+x test.sh #给test.sh可执行权限   如test,sh文件在 /home/work文件下   执行…
[root@imon-2 ~]# cd /root/ + cd /root/ ++ echo -ne '\033]0;root@imon-2:~' [root@imon-2 ~]# ll + ls --color=auto -l --color=auto total 2416 -rw-------. 1 root root 1250 Jul 20 2012 anaconda-ks.cfg -rw-r--r--. 1 root root 517272 Dec 21 2013 confuse-2.7…
有时我们在linux下执行一个sh文件,会报错“SYNTAX ERROR:UNEXPECTED END OF FILE”,这个现象主要是工作的系统环境改变造成的. 若最初脚本中是在windows下,使用sublime编辑器写.将shell脚本传至linux中:使用命令bash -x SCRIPT检查语法总是出一个错误 syntax error:unexpected end of file. 原因:dos文件传输到unix系统时,会在每行的结尾多一个^M,在vim的时候,当你用如下命令查看:cat…
构建LINUX下的入侵检测系统——LIDS   系统管理命令--vlock http://blog.chinaunix.net/uid-306663-id-2440200.html LIDS官方网站:http://lids.luky.org/ Who's new hkbaduharpo_marxarthit75lbcoqkfkravciakWho's online There are currently 0 users and 2 guests online.LIDS 2.2.3rc3 is r…
linux 下执行.sh文件提示permission denied 在脚本文件目录下运行命令,赋予权限: chmod 777 *.sh or chmod +x  *.sh…
1.修改ls显示格式 ls -l --time-style '+%Y/%m/%d %H:%M:%S' drwxr-x--- edwetl edwetl // :: arc_test ls -l --time-style '+%Y%m%d %H:%M:%S' drwxr-x--- edwetl edwetl :: arc_test 2.修改配置到bash_profile vi ~/.bash_profile export TIME_STYLE='+%Y/%m/%d %H:%M:%S' cat ~/…