I have a file in a
.directory (so I can only see it through the terminal) and I have a file on the desktop with the same name.
How do I replace the file in the directory with the one on the desktop?
1. The console way:
If you want to move/copy from .directory to the Desktop:
mv /path/to/.directory/filename ~/Desktop cp /path/to/.directory/filename ~/Desktop
Alternatively, if you want to move/copy from the Desktop into .directory:
mv ~/Desktop/filename /path/to/.directory cp ~/Desktop/filename /path/to/.directory
The difference between mv and cp is:
mv will move a file (the file at origin gets destroyed).
cp will copy a file (you get to keep the file at origin).
2. The GUI way:
Open your file manager and activate Show hidden files (Ctrl+H on PcManFM and many others). You can then navigate any hidden directories and drag and drop your file to its intended destination.