I am taking some online courses. I want to seperate all commands. That is, I want to save all commands that I execute during classes on a different memory file than my other system commands. This will make my work easy when I work on the system and when I work on classes.
Is it possible to save terminal commands on different files and then load previous commands from a specific file? If yes, how can this be done?
If you are not able to understand the problem properly, here`s an example.
Type 1:- During classes, I use commands for compiling and executing files, like "gcc abcd.c -o abcd" and "abcd"
Type 2:- But, while working on system, I use commands like "sudo apt install ..." or "sudo apt purge ..." Now, when I want to use previous system commands after a class, I will be having lots of commands of type 1 and it will be annoying. So, I want to save type 1 and type 2 commands differently on different files and load a specific file whenever I require.
Details about the system:- Shell - /bin/bash
VERSION="16.04.7 LTS (Xenial Xerus)"
PRETTY_NAME="Ubuntu 16.04.7 LTS"
According to @Marc Vanhoomissen, I was able to create another history file and named it .classes (Note:- .class is used for java files. so I can`t use it). I open terminal, see that it is using bash_history as HISTFILE. Then I change to .classes, but the commands did not change. The command in the image is NOT specified in .classes file. On top of that, it does not show the commands of .classes file at all.