General :: How To Copy Bash History
Feb 10, 2011what command do i use to copy .bash_history to /tmp location?
View 9 Replieswhat command do i use to copy .bash_history to /tmp location?
View 9 RepliesIs it possible to use the keyboard in order to select some text in the terminal windows that is not in the currently edited line? (for example, in order to copy part of previous command output).
View 3 Replies View RelatedUbuntu :: save copy of bash entries / history?
View 7 Replies View RelatedI am working on a x86 target running fedora 9.
Whenever I reboot it, my history returns to some state, and I do not have commands I did in the sessions before the reboot.
What I have to change to have updated history I had before reboot?
In my organization, we have a centralized home directory for all users which gets mounted from all the machine where user logs in.Since any XYZ user can login to any of hundreds test machines and run 'sudo su - myusername', hence taking control of my home dir.How do I track who took control of my home dir and deleted its contents.
View 3 Replies View RelatedIs there a way to define an unlimited history in Bash ?
View 3 Replies View RelatedPossible Duplicate: Can history files be unified in bash? I have bash running in an ssh session, call this session A. I leave the office, go home, ssh to the same box, call this session B. From session B, I'd like to be able to look at the history of session A.
View 1 Replies View RelatedHow can I get/filter history entries in a specific range?I have a large history file and frequently usehistory | grep somecommandNow, my memory is pretty bad and I also want to see what else I did around the time I entered the command.For now I do this:get match, say 4992 somecommand, then I do history | grep 49[0-9][0-9]this is usually good enough, but I would much rather do it more precisely, that is see commands from 4972 to 5012, that is 20 commands before and 20 after. I am wondering if there is an easier way? I suspect, a custom script is in order, but perhaps someone else has done something similar before.
View 2 Replies View RelatedIs there a way to get the bash history to delete older entries that are identical to the new one?Say the bash history would look like this normally:
Code:
cd ~
ls -l
[code]...
i want to delete some say 10 previous commands in bash shell!
View 3 Replies View RelatedI would like to keep track of not only what bash commands I used and when, but also where they were issued from, i.e. what was the current working directory when I issued "foobar" on a particular day and time. Can we ask bash history to keep track of working directories too? I have tried to get an idea of this reading the enormous "man bash", but I don't seem to have an answer yet either way.
View 11 Replies View RelatedI am using squid proxy server for sharing Internet in my internal network. I would like to know that how can I check the browsing history by individual users web surfing history by their IP addresses?
View 1 Replies View RelatedBash's command history is great, especially it is useful when adding the history -a command to the COMMAND_PROMPT.However, I'm wondering if there is a way to log the commands to a file as soon as the Return key is pressed, e.g. before starting the command and not on completion of the command (using the COMMAND_PROMPT option would save the command once the prompt is there again).
I read about auditing programs like snoopy and session recorder like script but I thought they're already too complex for the simple question I have. I guess that deactivating that script logs all the output of the command would lead already in the right direction but isn't there a quicker way to solve that probelm?
I use Ubuntu 9.04 on my laptop.Is there any way to get history of ubuntu nautilus like copy, remove something to usb drive etc.
View 7 Replies View RelatedWhat's the command to delete bash command history?
View 4 Replies View Relatedterminal i open i have no history; the history is kept only in that terminal and is gone when i exit the terminal.If I count lines:as a user:
Code:
$ wc -l .bash_history
wc: .bash_history: Permission denied
[code]....
I'm looking for a way to copy and archive 10 years worth of message history from a Yahoo Group. With some changes in the yahoo group format coming in the future my group has concerns. I can copy a page at a time but it is not practical. how to go about it. I'm nearly clueless and am told that it can't be done.
View 9 Replies View RelatedI have tried a combination of the following lines in .bashrc to try and control duplicates in the bash history file:
export HISTCONTROL=ignoreboth
export HISTCONTROL=erasedups
export HISTCONTROL=ignoredups
[code]....
installed Ubuntu Server Edition and I've found that my first user has a bash history and I can turn on a coloured prompt by editing my .bashrc etc but new users don't have that!I did : useradd -d /home/newb -m newbpasswd newband the correct looking .bashrc file appears to be in /home/newb but it is being ignore by bash when logged in as newb. Instead I am presented with just a dollar prompt instead of "newb@server"how can I sort out my users with proper prompts?
View 1 Replies View Relatedi wrote a script to run over a macintosh system
Quote:
#!/bin/bash
history -c
clear
but the script not doing what i am trying to achieve.
Lets say I wanted to save my bash history permanently. I.e., so I could look in a log somewhere and find some command I used 6 months ago, like the one I used to get my printer drivers installed
View 1 Replies View RelatedTried this, but there's no such a command in Arch.And this also doesn't work:Code:find ~ | grep -i pidgin | xclipboard Error: another clipboard is already running
View 5 Replies View RelatedI've been looking for how to set this up in bash with no luck so far. I can change what file the history log is written to, and how much history is saved. But it only writes the saved part when bash exits. Instead, I'd like to have bash write that file continuously as each command is entered (and maybe also do an fsync(2) to flush it to disk). That way I can see the command I crashed the box with Anyone know the magical incantation for that?
But there appears to be nothing that I can find there, in the man page, or other searches, that suggest it even can do continuous.
Is it possible to copy the output into the clipboard without using the mouse?
For example, I would like to do something like this:
$ pwd >> clipboard
I know how to redirect the output of a terminal to a file. For example, if I want to list all the files in ~/Documents and output to a file called test.txt, I would do this: ls ~/Documents > test.txt The question is, can I copy the output to test.txt AFTER I have carried out the command? This would mean that I wouldn't have to know in advance whether I want to copy the output to file. I want to do something like this: ls ~/Documents Then this: <bash command for copying standard output to test.txt>
View 2 Replies View RelatedLets say I log in to bash, open a file in vi, then using alt-f2 I open a new terminal. After logging in I navigate to a second file and open that in vi. How can I CnP between these two files?
I found this from [URL]. I'm not familiar with this command shift-8-y-y. I follow the vimtutor and use virtual mode. I tried this sequence and was unsuccessful.
And, I read this about registers. I found a mention of using double_quote-p to 'put' or paste the register, but this does not work in a different file. The second file reported the register empty.
Alternatively, I read in the VIM docs, it is possible to open multiple files under split screens. This may be a course to a solution. The need I often encounter has me navigating in a different bash window to find a file, then wishing to copy between the two. Whereas, I imagine, a split VIM window useful for files in the same directory.
For reasons I won't get into, I need to copy directories so long as the average system load is low. Can someone help me write a BASH script that will copy the contents of a directory, but check to make sure the average system load is below X before copying each file, and if not, wait Y seconds and try again?
View 3 Replies View RelatedI have this code:
Code:
original_content=${content[@]};
echo ${#content[@]} # is 23
echo ${#original_content[@]} # is 1
I'd expect original_content should be copy of content. How to copy array?
I have a lot of filenames (strings) following the same convention
m02_+1+7_London_0000$01.cfg
m02_+1+8_London_0000$01.cfg
m02_+1+8_London_0000$01.cfg
[code].....
What I want to do is to create a script that will interpret the following string and save into variables part of its name
m02_+1+7_London_0000$01.cfg as
------X-Y--City---------
X=1
Y=7
City=London
[code]....
then I want to copy the files that go all the files with the same City and X and Y to the same subfolder City/MX.Y I will need some help start doing that. And I think the first would be to get part of the filenames strings into variables.
i have one questions :"bash copy filename destin_dir"1- i need a bash script to copy file from one directory to another , and if the destination directory have the same file name, add '_1' to the file name ..and if there is a file with 'filename_1' , add '_2' to the file name and become 'filename_2' and so on
View 5 Replies View Related