[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.tar.gz
drwxr-xr-x. 2 root root 4096 Jul 20 2013 deploy
-rw-r--r--. 1 root root 30434 Jul 20 2012 install.log
-rw-r--r--. 1 root root 7878 Jul 20 2012 install.log.syslog
-rwxr-xr-x. 1 root root 1008 Dec 5 2012 jboss-demon.sh
-rwxr-xr--. 1 root root 133 Dec 5 2012 mount.sh
-rw-r--r--. 1 root root 1889401 Dec 21 2013 pcre-8.33.tar.gz
++ echo -ne '\033]0;root@imon-2:~'
[root@imon-2 ~]# vi .bashrc
+ vi .bashrc
++ echo -ne '\033]0;root@imon-2:~'
[root@imon-2 ~]# vim .bashrc
+ vim .bashrc
++ echo -ne '\033]0;root@imon-2:~'
[root@imon-2 ~]# ll
+ ls --color=auto -l --color=auto

在linux下执行命令都会报红色的问题,

原因:用户可能意外的执行了set -x导致系统命令都出现调试;

解决办法:用户直接执行:set +x结束调试就可以了

linux下出现+ ls --color=auto -l --color=auto...++ echo -ne '\033]0;root@imon-2:~'等的更多相关文章

  1. 实现Linux下的ls -l命令

    基本实现了Linux下的ls -l命令,对于不同的文件显示不同的颜色和显示符号链接暂时没有实现: /************************************************** ...

  2. 【Linux基础】linux下修改ls显示的时间格式

    1.修改ls显示格式 ls -l --time-style '+%Y/%m/%d %H:%M:%S' drwxr-x--- edwetl edwetl // :: arc_test ls -l --t ...

  3. 实现linux下的ls

    实现linux下的ls ls的使用 ls -a 列出文件下所有的文件,包括以"."开头的隐藏文件(linux下文件隐藏文件是以.开头的,如果存在..代表存在着父目录). ls -l ...

  4. 高仿linux下的ls -l命令——C语言实现

    主要用到的函数可以参考头文件,仅仅支持ls -l这功能,扩展就交给大家了0.0 相关测试图片: ​ ​ 话不多说,直接上码 #include <stdio.h> #include < ...

  5. Linux下执行ls命令提示CMake Error错误

    一.系统环境 Fedora10 二.出错情况 执行ls命令出现如下错误提示: CMake Error: The source directory "/etc/--color=auto&quo ...

  6. linux下实现ls()函数遍历目录

    转载请注明原创:http://www.cnblogs.com/StartoverX/p/4600794.html 需求:在linux下遍历目录,输出目录中各文件名. 在linux下遍历目录的相关函数有 ...

  7. [C++]linux下实现ls()函数遍历目录

    转载请注明原创:http://www.cnblogs.com/StartoverX/p/4600794.html 需求:在linux下遍历目录,输出目录中各文件名. 在linux下遍历目录的相关函数有 ...

  8. 模拟linux下的ls -l命令

    #include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h&g ...

  9. 编程实现Linux下的ls -l

    头文件 #ifndef __FUNC_H__ #define __FUNC_H__ #include <stdio.h> #include <stdlib.h> #includ ...

随机推荐

  1. 09.13随笔2014年9月13日22:32:38,奶爸的英语教室,groovy

    我们这里只推荐一本语法书:台湾的旋元佑老师写的<文法俱乐部>(简体版名为<语法俱乐部>).这本书因为出版社倒闭而绝版,淘宝可以买到影印的版本. (1)学英语到 奶爸的英语教室  ...

  2. Codevs 4600 [NOI2015]程序自动分析

    4600 [NOI2015]程序自动分析 时间限制: 1 s 空间限制: 256000 KB 题目等级 : 黄金 Gold 传送门 题目描述 Description 在实现程序自动分析的过程中,常常需 ...

  3. 代码方式删除SVN

    public static void delect(File s) { File b[] = null; if (s.exists()) {// 判读是否存在 if (s.isDirectory()) ...

  4. asmdisk 丢失问题一次记录

    环境 vm12 workstation ,11.2R 在安装RAC 第二台机器不显示磁盘的是问题 , oracleasm listdisks 查询没有结果 , 于是执行 oracleasm scand ...

  5. apache配置文件中的项目

    对于每个配置项目,有几个要素: 首先是项目名称 其次是配置的语法 再次是配置的默认值 配置所处的配置文件的位置(分区) 配置所在的模块分区(和核心是否紧密) 配置项目所在的模块 所以对于每个配置项目, ...

  6. php中文编码

    header("Content-type: text/html; charset=utf-8"); header('Location: http://www.example.com ...

  7. Omnithreadlibary学习(3)-IOmniTask异步执行SendMessage

    在任务中发送消息, 可以是函数或者对象方法 TOmniTaskMessageEvent = procedure(const task: IOmniTaskControl; const msg: TOm ...

  8. android 布局权重问题(转载)

    //权重和父容器orientation有关 horizontal 指水平方向权重  android:layout_width vertical  指垂直方向权重   android:layout_he ...

  9. C语言中调用Lua

    C语言和Lua天生有两大隔阂: 一.C语言是静态数据类型,Lua是动态数据类型 二.C语言需要程序员管理内存,Lua自动管理内存 为了跨越世俗走到一起,肯定需要解决方案. 解决第一点看上去比较容易,C ...

  10. 【原】jQuery编写插件

    分享一下编写设置和获取颜色的插件,首先我将插件的名字命名为jquery.color.js.该插件用来实现以下两个功能1.设置元素的颜色.2.获取元素的颜色. 先在搭建好如下编写插件的框架: ;(fun ...