paCkeTroUTer Posted November 29, 2003 Report Share Posted November 29, 2003 I am trying to move all the contents of the current directory I am in into an other directory. I gave the following command but it moves only the files not the directories and sub-directories/files in it. bash-2.05a$ mv ./*.* ../testbed/ I am sure its something simple ... which I coudn't find in the man pages(or am I blind?) :unsure: Thanks Jeffery Quote Link to comment Share on other sites More sharing options...
tyme Posted November 29, 2003 Report Share Posted November 29, 2003 mv ./* ../testbed that should do it for you. mv automatically does recursive. your problem was using ./*.* because directories would not have a dot anywhere in them, unless of course you place a dot somewhere in their name. mv * ../testbed will also work Quote Link to comment Share on other sites More sharing options...
paCkeTroUTer Posted November 29, 2003 Author Report Share Posted November 29, 2003 (edited) thanks, but that example gives me the following results: bash-2.05a$ mv ./ ../testbed/ mv: cannot overwrite directory `../testbed/.' bash-2.05a$ mv ./ ../testbed mv: cannot overwrite directory `../testbed/.' testbed directory already exists... do I have to delete it before doing it ? [edit].... ooops sorry... re-trying again with the proper code.... Edited November 29, 2003 by paCkeTroUTer Quote Link to comment Share on other sites More sharing options...
tyme Posted November 29, 2003 Report Share Posted November 29, 2003 sorry i corrected myself while you were reading my unedited post, please re-read my post for the correction. i forgot an * Quote Link to comment Share on other sites More sharing options...
paCkeTroUTer Posted November 29, 2003 Author Report Share Posted November 29, 2003 all good mate. Thanks. :) :) Quote Link to comment Share on other sites More sharing options...
Guest anon Posted November 29, 2003 Report Share Posted November 29, 2003 For anyone interested in the A to Z of Linux commands, we have a good link in our weblinks section. http://www.mandrakeusers.org/index.php?act...&CODE=01&cat=14 Quote Link to comment Share on other sites More sharing options...
Cannonfodder Posted November 29, 2003 Report Share Posted November 29, 2003 This has always worked good for me when I want to cp a partition.. cp -pax {source} {dest} I'm no fan of a mv command when dealing with a large set of files :) *replay* WHERE ARE MY FILES???? WHERE DID THEY GO??? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.