tippetariuswrites: Soul Gems from Skyrim (Default)
[personal profile] tippetariuswrites

Plenty of online articles explain how to use the Linux history command, but I'm noting it to myself here for easy reference.

To see a list of commands you've run in the terminal, enter:

history

To narrow down the results and find something specific (for example, to list all the rsync commands you've used), combine the history command with grep:

history | grep rsync

Each command in the history list has a number associated with it. To run a command again without having to retype the whole thing, enter ! followed by the command's associated number. For example:

!201

Entering !201 is less painful than re-typing something like rsync -artvu --delete "/run/media/username/data-drive/" "/run/media/username/backup-drive/".

Source: How to use the history command in Linux

(no subject)

Date: February 16th, 2020 09:55 pm (UTC)
paserbyp: (Default)
From: [personal profile] paserbyp
Very clear and very useful!
Page generated Monday, March 16th, 2026 02:37 am
Powered by Dreamwidth Studios