Save history with a script...


PicPoc

Recommended Posts

Hi !

On unRAID, .bash_history is not saved on reboot, I try to save history :

 

# history | sed 's/^ *[0-9]* *//' > /boot/custom/bash_history

 

1) by CLI, no problem :

-rw-rw-rw- 1 root root 4.0K Oct 28 12:18 bash_history

 

2) On a script, destination file is zero K :

-rw-rw-rw- 1 root root 0K Oct 28 12:20 bash_history

 

I'm afraid there's no solution ? Please tell me I'm wrong.

;)

Thanks !

Edited by PicPoc
Link to comment
  • 4 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.