Linux question: What do you _think_ should happen in this command (don't look up what actually happens, answer what you think should happen):
# mv src /path/to/dest/
src is a directory containing subdirectories, /path/to/dest/ does not exist.
Linux question: What do you _think_ should happen in this command (don't look up what actually happens, answer what you think should happen):
# mv src /path/to/dest/
src is a directory containing subdirectories, /path/to/dest/ does not exist.
@blindcoder none of them?
error missing -r flag?
I don't knoe if TARGET or -r is checked first
@blindcoder @mezz oof i am not awake
mv: cannot move 'src' to 'path/to/dest': No such file or directory
@saxnot slight typo in there: path/to/dest vs path/to/dest/ (trailing /). path/to does exist.
@blindcoder path/to existing is new info absent from the original toot
@saxnot true, should have put that in.
@blindcoder I guess none of this changes the answer
It's the first choice provided and I was wrong about -r
@saxnot @blindcoder because /path/to/ begins with a / it will start from the file system root. However your path/to exists in /tmp/masto, not in the root.
@mezz @blindcoder yeah I wasn't willing to start a docker or clean up in my /
@saxnot @blindcoder You probably don't have to, you could either specify the full path for the purposes of this example (/tmp/masto/path/to) or just make it a relative path.
@mezz @blindcoder huh
docker run -it --rm 'debian:trixie-slim'
root@80721cf2c18a:/# mkdir -p path/to
root@80721cf2c18a:/# mkdir -p src/something
root@80721cf2c18a:/# mkdir -p src/foobar
root@80721cf2c18a:/# touch ^C
root@80721cf2c18a:/# mv src /path/to/dest/
root@80721cf2c18a:/# ls /path/to/dest/
foobar something
So it's the third option
@mezz @blindcoder not being part of the voters because obviously this counts as looking up
@blindcoder Well it begins with a #, so it doesn't do anything because it's a comment right? :cat_sip:
Jokes aside, probably option 3? I don't remember if mv needed a -r flag or not.
@blindcoder Also kinda assuming that /path/to exists atleast, if it doesn't I would expect it to fail.
@mezz @blindcoder good to know someone else also assumed -r because I did the same mistake
I assume # means it's a root shell instead of $ commonly used to mean user shell