Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 06-27-2016, 02:26 PM   #1
Registered: Aug 2015
Distribution: *DEB, Centos, NXOS
Posts: 242

Rep: Reputation: 38
mv files from loc to current dir


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:

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).


Old 06-27-2016, 04:23 PM   #2
LQ Guru
Registered: Mar 2004
Distribution: Slackware
Posts: 6,230

Rep: Reputation: 724Reputation: 724Reputation: 724Reputation: 724Reputation: 724Reputation: 724Reputation: 724
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:
mv /path/to/some/file .
Old 06-28-2016, 08:38 AM   #3
Registered: Aug 2015
Distribution: *DEB, Centos, NXOS
Posts: 242

Original Poster
Rep: Reputation: 38
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 "."

Last edited by biosboy4; 06-28-2016 at 09:28 AM.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
copying files from home dir to another dir from another dir in a lower dir chomito44 Linux - General 5 10-19-2013 06:18 PM
tar dir and sub dir removing files but not existing not empty dir j-me Linux - General 2 08-12-2013 11:37 AM
Perl Extracting 450000+ files in subdirs into single output file in current dir vamsiv Programming 2 10-05-2011 08:39 PM
GDB - How to set breakpoints in files located outside the current dir chogall Programming 2 02-17-2011 03:25 PM
how to create a driver makefile which uses header files outside current dir? netskink Linux - Kernel 5 05-21-2009 10:35 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:34 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration