I lost some files by using the mv
command. I don't know where they are. They are not in the directory to which I intended to copy them.
Below is a transcript of what I did:
samuelcayo@CAYS07019906:~/Downloads/221-tp2-public-main$ cd
samuelcayo@CAYS07019906:~$ ls
Desktop Documents Downloads GameShell Music Pictures pratice Public Templates Videos
samuelcayo@CAYS07019906:~$ mkdir tp2
samuelcayo@CAYS07019906:~$ ls
Desktop Documents Downloads GameShell Music Pictures pratice Public Templates tp2 Videos
samuelcayo@CAYS07019906:~$ cd Downloads/221-tp2-public-main/
samuelcayo@CAYS07019906:~/Downloads/221-tp2-public-main$ ls
backup copybash Dockerfile ntfy-1.16.0 packets.txt README.md restore secret
cloud data Dockerfile_CAYS07019906 ntfy.zip rapport-tp2.md remplacer.sed sauvegarde.sh tail
samuelcayo@CAYS07019906:~/Downloads/221-tp2-public-main$ mv rapport-tp2.md tp2
samuelcayo@CAYS07019906:~/Downloads/221-tp2-public-main$ mv Dockerfile_CAYS07019906 tp2
samuelcayo@CAYS07019906:~/Downloads/221-tp2-public-main$ mv packets.txt tp2
samuelcayo@CAYS07019906:~/Downloads/221-tp2-public-main$ mv sauvegarde.sh tp2
samuelcayo@CAYS07019906:~/Downloads/221-tp2-public-main$ cd
samuelcayo@CAYS07019906:~$ cd tp2/
samuelcayo@CAYS07019906:~/tp2$ ls
samuelcayo@CAYS07019906:~/tp2$ ls -l
total 0
samuelcayo@CAYS07019906:~/tp2$ cd ..
mv rapport-tp2.md $HOME/tp2
(or equivalentlymv rapport-tp2.md ~/tp2
) and similarly for the rest, since you created the directorytp2
inside your home directory.sauvegarde.sh
which is now~/Downloads/221-tp2-public-main/tp2
tp2/
when doing cd, where forcing its status to a directory is unimportant, but typedtp2
when doing mv, where it is important.