Skip to main content
deleted 35 characters in body
Source Link
Rui F Ribeiro
  • 58k
  • 28
  • 156
  • 238

I need help with the script below. The requirement is to capture command line history in a file with specific date and time of commands, when they were executed.

The below script captures history with date and time but it also assigns the current date and time for older commands. Also I want to extend the script to take incremental backup of the history output file.

#!/bin/bash
. ~/.bash_profile
HISTFILE=~/.bash_history
set -o history
history >/home/user/hist_`date "+%d%b%y%T"`

I need help with the script below. The requirement is to capture command line history in a file with specific date and time of commands, when they were executed.

The below script captures history with date and time but it also assigns the current date and time for older commands. Also I want to extend the script to take incremental backup of the history output file.

#!/bin/bash
. ~/.bash_profile
HISTFILE=~/.bash_history
set -o history
history >/home/user/hist_`date "+%d%b%y%T"`

The requirement is to capture command line history in a file with specific date and time of commands, when they were executed.

The below script captures history with date and time but it also assigns the current date and time for older commands. Also I want to extend the script to take incremental backup of the history output file.

#!/bin/bash
. ~/.bash_profile
HISTFILE=~/.bash_history
set -o history
history >/home/user/hist_`date "+%d%b%y%T"`
edited tags
Link
Gilles 'SO- stop being evil'
  • 865.5k
  • 205
  • 1.8k
  • 2.3k
added 8 characters in body
Source Link
lcd047
  • 7.4k
  • 1
  • 24
  • 33

I deedneed help with the below script below. RequirementThe requirement is to capture command line history in a file with specific date and time of commandcommands, when it wasthey were executed.

The below script captures history with date and time but it also assigns the current date and time for older commands. Also I want to extend the script to take incremental backup of the history output file.

#!/bin/bash
. ~/.bash_profile
HISTFILE=~/.bash_history
set -o history
history >/home/user/hist_`date "+%d%b%y%T"`

I deed help with the below script. Requirement is to capture command line history in a file with specific date and time of command, when it was executed.

The below script captures history with date and time but it also assigns the current date and time for older commands. Also I want to extend the script to take incremental backup of the history output file.

#!/bin/bash
. ~/.bash_profile
HISTFILE=~/.bash_history
set -o history
history >/home/user/hist_`date "+%d%b%y%T"`

I need help with the script below. The requirement is to capture command line history in a file with specific date and time of commands, when they were executed.

The below script captures history with date and time but it also assigns the current date and time for older commands. Also I want to extend the script to take incremental backup of the history output file.

#!/bin/bash
. ~/.bash_profile
HISTFILE=~/.bash_history
set -o history
history >/home/user/hist_`date "+%d%b%y%T"`
Title and grammar/formatting
Source Link
jasonwryan
  • 74.8k
  • 35
  • 204
  • 230
Loading
Source Link
SunLynx
  • 101
  • 2
  • 10
Loading