history

修改linux系统history命令的条数和格式

房东的猫 提交于 2019-12-03 07:24:13
在一次测试环境遇到的情况,发现服务莫名其妙挂了,以为服务有bug,查了一下午,后来一个同事说:“是我把服务关了啊”。。。。 是可忍孰不可忍,原生的history命令,只能看到输入的命令历史,看不到什么时候,谁输入的。 特此在网上找到修改history命令的办法: 1.用root用户打开系统环境变量设置的文件 vim /etc/profile 2.在最下面,插入下面几行代码 USER_IP=`who -u am i 2>/dev/null| awk '{print $NF}'|sed -e 's/[()]//g'` export HISTTIMEFORMAT="[%F %T][`whoami`][${USER_IP}] " export HISTSIZE=100000 #命令历史记录的条数 export HISTFILESIZE=100000 #命令历史文件记录历史的条数 export HISTIGNORE='ls*:ll' #忽略的命令 3.让环境变量生效 source /etc/profile 以后再输入history命令,就会变成下面的样子了,有时间,有用户,有ip,而且保存最近10万条记录。 哼哼,再也不怕背锅了 来源: https://www.cnblogs.com/dijia478/p/11782974.html

Where did the text segment get its name?

陌路散爱 提交于 2019-12-03 06:57:11
问题 Traditional assembler, and higher level compilers work with several memory segments , according to intended use. Hence, there is a data segment, a stack segment, a bss, and text segment. The text segment is also called the code segment. Text segment? For machine code ? I have asked all the old-timers I could find, how something as unreadable as machine code came to be know as the "text segment". Every one of them agreed that, that was really what it was called, but none of them seemed to be

TFS 2010: history lost after moving a folder

不羁的心 提交于 2019-12-03 06:45:52
问题 In order to clean up my project structure, I moved a folder into another (new) folder through the TFS Power Tools Shell-Extension (Rename/Move). After checking the history at the new place, the move is the only entry. (I tried one folder up, down, even on single files in the moved folder.. same result.) I had also put on some labels on versions of the folder before the move, since there were some important states of the code I wanted to get back to. So.. what went wrong, and how can I either

How to remove launch configuration histories in eclipse?

馋奶兔 提交于 2019-12-03 06:34:38
问题 Right click an arbitrary existing project in Package Explore, choose "export..." - "Java" - "Runnable JAR file", I find all the old projects in the "launch configuration" list. Those projects have already been removed from the disk, and are not visible in the Package Explore. How can I remove them from that list? I'm using eclipse indigo. 回答1: Under Window...Preferences...Run/Debug...Launching...Launch Configurations, you can activate and deactivate some filters that restrict what is shown in

Completely disable IPython output caching

天涯浪子 提交于 2019-12-03 06:02:59
问题 I'm dealing with some GB-sized numpy arrays in IPython. When I delete them, I definitely want them gone, in order to recover the memory. IPythons output cache is quite annoying there, as it keeps the objects alive even after deleting the last actively intended reference to them. I already set c.TerminalInteractiveShell.cache_size = 0 in the IPython configuration, but this only disables caching of entries to _oh , the other variables like _ , __ and so on are still created. I'm also aware of

How does angular application handle refresh page and could we use $history on loading directives

核能气质少年 提交于 2019-12-03 05:51:30
问题 So two questions. How does angular applications handle refresh page, b/c from what I heard, $rootScope destroy() on refresh and application gets re-run and re-config -ed, and I was wondering if there's an elegant way to preserve the $rootScope without having to store $rootScope variables as a string into a storage. If I load a template on a directive that loads a modal on the page, is it possible to configure history to not navigate but to revert the open modal. and due to validations and

zsh history is too short

混江龙づ霸主 提交于 2019-12-03 05:08:04
When I run history in Bash, I get a load of results (1000+). However, when I run history the zsh shell I only get 15 results. This makes grepping history in zsh mostly useless. My .zshrc file contains the following lines: HISTFILE=~/.zhistory HISTSIZE=SAVEHIST=10000 setopt sharehistory setopt extendedhistory How can I fix zsh to make my shell history more useful? UPDATE If in zsh I call history 1 I get all of my history, just as I do in Bash with history . I could alias the command to get the same result, but I wonder why does history behave differently in zsh and in Bash. The OP has already

jQuery + Ajax Hash / History and more

柔情痞子 提交于 2019-12-03 03:46:40
I am trying to get a handle on using URL hashes in jQuery to control history in Ajax and make links / pages book-markable. I have tried almost every plug-in out there, and I cant seem to get any to work properly, so I dont have any code examples really. But I am open to any suggestions, information, tutorials, etc. The difference on one of the pages I am trying to incorporate this into is that I have a jQuery animation driven splash/loading page, which is also the same page that all of the content will be loaded into. ..and on this link, I want to by-pass all of the splash / loading animation

ejabberd: retrieve chat history from mysql db

妖精的绣舞 提交于 2019-12-03 03:29:34
I'm building a chat system based on ejabberd using an iOS client (and XMPPFramework ). My current chat system supports only one-on-one conversations between users saving a chat history on a MySQL database. In order to recreate the same chat system, i'd need ejabberd to retrieve chat history from my database so the users don't lose previous conversations when switching to the new chat system. I'd like not to save the conversation client-side since the iOS app can be deleted and reinstalled (or the user could switch device). Is it possible to make ejabberd read chat history from my MySQL db?

this.props.history is deprecated (react-router)

匿名 (未验证) 提交于 2019-12-03 03:08:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I was trying to programatically navigate to a different page like so this.props.history.push('/new-path'); it worked, but I got a deprecation warning in console saying: Warning: [react-router] props.history and context.history are deprecated. Please use context.router. more about it here https://github.com/reactjs/react-router/blob/master/upgrade-guides/v2.0.0.md#changes-to-thiscontext Afterwards I tried to use this new method like so this.context.router.push('/new-path') but this doesn't seem to be the right approach. 回答1: Maybe you did