I think I wiped out a bunch of subdirectories [on hold] The Next CEO of Stack OverflowHow to prevent `mv` from moving a collection of files into a single regular one?Replace bunch of files maintaining pathAre there any dangers in using mv (instead of cp followed by rm)?How to move subdirectories into another subdirectory within the same directory?Recursive move (`mv -rn`, like `cp -rn`), a move that will only move not present filesI accidentally copied part of /* to /some/directory, how should I fix my mistake?I've just “mv”ed a 49GB directory to a bad file path, is it possible to restore the original state of the files?moving subdirectories with the mv commandEmpty all files in subdirectories to parent directoryNeed to loop through folder and move files to different directory?
WOW air has ceased operation, can I get my tickets refunded?
Why the difference in type-inference over the as-pattern in two similar function definitions?
Which one is the true statement?
Why didn't Khan get resurrected in the Genesis Explosion?
The past simple of "gaslight" – "gaslighted" or "gaslit"?
How to write a definition with variants?
How to install OpenCV on Raspbian Stretch?
Easy to read palindrome checker
Would a grinding machine be a simple and workable propulsion system for an interplanetary spacecraft?
How to check if all elements of 1 list are in the *same quantity* and in any order, in the list2?
Is it possible to replace duplicates of a character with one character using tr
Reference request: Grassmannian and Plucker coordinates in type B, C, D
Axiom Schema vs Axiom
0 rank tensor vs 1D vector
How do I align (1) and (2)?
Won the lottery - how do I keep the money?
Where do students learn to solve polynomial equations these days?
Writing differences on a blackboard
Yu-Gi-Oh cards in Python 3
How to prove a simple equation?
How to avoid supervisors with prejudiced views?
Method for adding error messages to a dictionary given a key
Does Germany produce more waste than the US?
Is it okay to majorly distort historical facts while writing a fiction story?
I think I wiped out a bunch of subdirectories [on hold]
The Next CEO of Stack OverflowHow to prevent `mv` from moving a collection of files into a single regular one?Replace bunch of files maintaining pathAre there any dangers in using mv (instead of cp followed by rm)?How to move subdirectories into another subdirectory within the same directory?Recursive move (`mv -rn`, like `cp -rn`), a move that will only move not present filesI accidentally copied part of /* to /some/directory, how should I fix my mistake?I've just “mv”ed a 49GB directory to a bad file path, is it possible to restore the original state of the files?moving subdirectories with the mv commandEmpty all files in subdirectories to parent directoryNeed to loop through folder and move files to different directory?
I had a bunch of subdirectories here under ~/Sites. (This is on MAC 10.14 "Mojave" actually, not on linux.)
I needed to move a directory into the ~/Sites directory so I did
mv . ~/Sites/*
I think it was that one. Or one of these...
mv . ~/Sites/fetch
mv -r . ~/Sites/fetch
mv ./ ~/Sites/fetch
Now all the subdirectories in ~/Sites are gone except one of them which had caused some kind of error. I'm guessing everything is gone but under any chance the directories might be recoverable I'm just asking here.
mv
New contributor
anthony galligani is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
put on hold as unclear what you're asking by Rui F Ribeiro, jimmij, maulinglawns, Kusalananda♦ yesterday
Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
add a comment |
I had a bunch of subdirectories here under ~/Sites. (This is on MAC 10.14 "Mojave" actually, not on linux.)
I needed to move a directory into the ~/Sites directory so I did
mv . ~/Sites/*
I think it was that one. Or one of these...
mv . ~/Sites/fetch
mv -r . ~/Sites/fetch
mv ./ ~/Sites/fetch
Now all the subdirectories in ~/Sites are gone except one of them which had caused some kind of error. I'm guessing everything is gone but under any chance the directories might be recoverable I'm just asking here.
mv
New contributor
anthony galligani is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
put on hold as unclear what you're asking by Rui F Ribeiro, jimmij, maulinglawns, Kusalananda♦ yesterday
Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
2
This doesn't make much sense, I'm afraid. None of those commands would have actually done anything, they all should have printed an error unless something's really different on macOS. Even if one of them worked, that would have moved stuff into the~/Sites/fetch
directory. Does that exist? What is the output ofls -l ~/Sites/fetch
?
– terdon♦
2 days ago
yeah I can't figure it out either and I did get errors.... idk then why all the files are wiped out...
– anthony galligani
2 days ago
fetch contains what I expected
– anthony galligani
2 days ago
And what did you expect? Are your subdirs there? We really can't help you if you don't give us any information.
– terdon♦
2 days ago
add a comment |
I had a bunch of subdirectories here under ~/Sites. (This is on MAC 10.14 "Mojave" actually, not on linux.)
I needed to move a directory into the ~/Sites directory so I did
mv . ~/Sites/*
I think it was that one. Or one of these...
mv . ~/Sites/fetch
mv -r . ~/Sites/fetch
mv ./ ~/Sites/fetch
Now all the subdirectories in ~/Sites are gone except one of them which had caused some kind of error. I'm guessing everything is gone but under any chance the directories might be recoverable I'm just asking here.
mv
New contributor
anthony galligani is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
I had a bunch of subdirectories here under ~/Sites. (This is on MAC 10.14 "Mojave" actually, not on linux.)
I needed to move a directory into the ~/Sites directory so I did
mv . ~/Sites/*
I think it was that one. Or one of these...
mv . ~/Sites/fetch
mv -r . ~/Sites/fetch
mv ./ ~/Sites/fetch
Now all the subdirectories in ~/Sites are gone except one of them which had caused some kind of error. I'm guessing everything is gone but under any chance the directories might be recoverable I'm just asking here.
mv
mv
New contributor
anthony galligani is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
anthony galligani is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
edited 2 days ago
Rui F Ribeiro
41.8k1483142
41.8k1483142
New contributor
anthony galligani is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
asked 2 days ago
anthony galliganianthony galligani
61
61
New contributor
anthony galligani is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
anthony galligani is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
anthony galligani is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
put on hold as unclear what you're asking by Rui F Ribeiro, jimmij, maulinglawns, Kusalananda♦ yesterday
Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
put on hold as unclear what you're asking by Rui F Ribeiro, jimmij, maulinglawns, Kusalananda♦ yesterday
Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
2
This doesn't make much sense, I'm afraid. None of those commands would have actually done anything, they all should have printed an error unless something's really different on macOS. Even if one of them worked, that would have moved stuff into the~/Sites/fetch
directory. Does that exist? What is the output ofls -l ~/Sites/fetch
?
– terdon♦
2 days ago
yeah I can't figure it out either and I did get errors.... idk then why all the files are wiped out...
– anthony galligani
2 days ago
fetch contains what I expected
– anthony galligani
2 days ago
And what did you expect? Are your subdirs there? We really can't help you if you don't give us any information.
– terdon♦
2 days ago
add a comment |
2
This doesn't make much sense, I'm afraid. None of those commands would have actually done anything, they all should have printed an error unless something's really different on macOS. Even if one of them worked, that would have moved stuff into the~/Sites/fetch
directory. Does that exist? What is the output ofls -l ~/Sites/fetch
?
– terdon♦
2 days ago
yeah I can't figure it out either and I did get errors.... idk then why all the files are wiped out...
– anthony galligani
2 days ago
fetch contains what I expected
– anthony galligani
2 days ago
And what did you expect? Are your subdirs there? We really can't help you if you don't give us any information.
– terdon♦
2 days ago
2
2
This doesn't make much sense, I'm afraid. None of those commands would have actually done anything, they all should have printed an error unless something's really different on macOS. Even if one of them worked, that would have moved stuff into the
~/Sites/fetch
directory. Does that exist? What is the output of ls -l ~/Sites/fetch
?– terdon♦
2 days ago
This doesn't make much sense, I'm afraid. None of those commands would have actually done anything, they all should have printed an error unless something's really different on macOS. Even if one of them worked, that would have moved stuff into the
~/Sites/fetch
directory. Does that exist? What is the output of ls -l ~/Sites/fetch
?– terdon♦
2 days ago
yeah I can't figure it out either and I did get errors.... idk then why all the files are wiped out...
– anthony galligani
2 days ago
yeah I can't figure it out either and I did get errors.... idk then why all the files are wiped out...
– anthony galligani
2 days ago
fetch contains what I expected
– anthony galligani
2 days ago
fetch contains what I expected
– anthony galligani
2 days ago
And what did you expect? Are your subdirs there? We really can't help you if you don't give us any information.
– terdon♦
2 days ago
And what did you expect? Are your subdirs there? We really can't help you if you don't give us any information.
– terdon♦
2 days ago
add a comment |
1 Answer
1
active
oldest
votes
mv interprets the last item on the command line as the target, so when you passed in “Sites/*”, the shell expanded that splat into a list of all the files/directories in Sites, and treated the last item in the list as your target name.
It likely failed to move “.”, and then moved all other contents of Sites to the “last” folder in that directory.
Only if the last thing that the*
expanded to was actually a directory, otherwisemv
would have produced an error. If it was a directory, all the moved stuff would now be found therein.
– Kusalananda♦
2 days ago
It is the first sentence of his question.
– Don Simon
2 days ago
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
mv interprets the last item on the command line as the target, so when you passed in “Sites/*”, the shell expanded that splat into a list of all the files/directories in Sites, and treated the last item in the list as your target name.
It likely failed to move “.”, and then moved all other contents of Sites to the “last” folder in that directory.
Only if the last thing that the*
expanded to was actually a directory, otherwisemv
would have produced an error. If it was a directory, all the moved stuff would now be found therein.
– Kusalananda♦
2 days ago
It is the first sentence of his question.
– Don Simon
2 days ago
add a comment |
mv interprets the last item on the command line as the target, so when you passed in “Sites/*”, the shell expanded that splat into a list of all the files/directories in Sites, and treated the last item in the list as your target name.
It likely failed to move “.”, and then moved all other contents of Sites to the “last” folder in that directory.
Only if the last thing that the*
expanded to was actually a directory, otherwisemv
would have produced an error. If it was a directory, all the moved stuff would now be found therein.
– Kusalananda♦
2 days ago
It is the first sentence of his question.
– Don Simon
2 days ago
add a comment |
mv interprets the last item on the command line as the target, so when you passed in “Sites/*”, the shell expanded that splat into a list of all the files/directories in Sites, and treated the last item in the list as your target name.
It likely failed to move “.”, and then moved all other contents of Sites to the “last” folder in that directory.
mv interprets the last item on the command line as the target, so when you passed in “Sites/*”, the shell expanded that splat into a list of all the files/directories in Sites, and treated the last item in the list as your target name.
It likely failed to move “.”, and then moved all other contents of Sites to the “last” folder in that directory.
answered 2 days ago


Don SimonDon Simon
486
486
Only if the last thing that the*
expanded to was actually a directory, otherwisemv
would have produced an error. If it was a directory, all the moved stuff would now be found therein.
– Kusalananda♦
2 days ago
It is the first sentence of his question.
– Don Simon
2 days ago
add a comment |
Only if the last thing that the*
expanded to was actually a directory, otherwisemv
would have produced an error. If it was a directory, all the moved stuff would now be found therein.
– Kusalananda♦
2 days ago
It is the first sentence of his question.
– Don Simon
2 days ago
Only if the last thing that the
*
expanded to was actually a directory, otherwise mv
would have produced an error. If it was a directory, all the moved stuff would now be found therein.– Kusalananda♦
2 days ago
Only if the last thing that the
*
expanded to was actually a directory, otherwise mv
would have produced an error. If it was a directory, all the moved stuff would now be found therein.– Kusalananda♦
2 days ago
It is the first sentence of his question.
– Don Simon
2 days ago
It is the first sentence of his question.
– Don Simon
2 days ago
add a comment |
2
This doesn't make much sense, I'm afraid. None of those commands would have actually done anything, they all should have printed an error unless something's really different on macOS. Even if one of them worked, that would have moved stuff into the
~/Sites/fetch
directory. Does that exist? What is the output ofls -l ~/Sites/fetch
?– terdon♦
2 days ago
yeah I can't figure it out either and I did get errors.... idk then why all the files are wiped out...
– anthony galligani
2 days ago
fetch contains what I expected
– anthony galligani
2 days ago
And what did you expect? Are your subdirs there? We really can't help you if you don't give us any information.
– terdon♦
2 days ago