LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   mv files from loc to current dir (https://www.linuxquestions.org/questions/linux-newbie-8/mv-files-from-loc-to-current-dir-4175583188/)

biosboy4 06-27-2016 02:26 PM

mv files from loc to current dir
 
Hello,

I am finding myself in need of a command or argument capable of moving files from a local directory to the current directory. It will follow this command:

Quote:

mkcd /home/Supervisor/Documents/hunterlogs$(date '+%d-%b-%Y-%a-%r-%j-%Z')
I will be unable to use the mv command in the traditional manner since the destination folder names are generated on the fly using timestamps that go all the way down to the second. (they have to be for organizational purposes).

Thanks!

biosboy4

keefaz 06-27-2016 04:23 PM

What does mkcd do? Make a directory and then cd into that directory?

If yes, you should be able to move file in this directory with:
Code:

mv /path/to/some/file .

biosboy4 06-28-2016 08:38 AM

Yes, mkcd makes a dir and cd's into it, it usually requires a configuration change to one of the Bash files to make this upgrade.

Thanks, I had no idea mv would function like that!, I was under the impression it always wanted a static name.

Thank you! :)

Edit: Ah, I see, it has nothing to do with mv and everything to do with the dot "."


All times are GMT -5. The time now is 12:33 AM.