in linux to copy and paste a file we have cp command
cp [OPTION]... SOURCE... DIRECTORY
But what if I don’t want to paste the file to any directory right now and I just want to copy it for future use? For example in GUI
right click to file>click on copy
#Do something else change directory/use internet/have coffee
Right click at some other directory/place>click on 'Paste' >file will be pasted at DIRECTORY
same procedure is applied to cut/move the file. Is there any command for such copy/cut in linux??
Assign the name of the file to a variable.
cdelsewhere, use internet, have coffee. Ok, we want that file in our current directory.Use
mvto move instead of copy.(Please don’t call this copy-pasting. It’s just copying. Note that the initial
$represents the prompt, don’t type that.)