LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 06-27-2016, 03:26 PM   #1
biosboy4
Member
 
Registered: Aug 2015
Distribution: Devuan/LFS
Posts: 237

Rep: Reputation: 38
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
 
Old 06-27-2016, 05:23 PM   #2
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 5,387

Rep: Reputation: 397Reputation: 397Reputation: 397Reputation: 397
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 .
 
Old 06-28-2016, 09:38 AM   #3
biosboy4
Member
 
Registered: Aug 2015
Distribution: Devuan/LFS
Posts: 237

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 10:28 AM.
 
  


Reply


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 07:18 PM
tar dir and sub dir removing files but not existing not empty dir j-me Linux - General 2 08-12-2013 12:37 PM
Perl Extracting 450000+ files in subdirs into single output file in current dir vamsiv Programming 2 10-05-2011 09:39 PM
GDB - How to set breakpoints in files located outside the current dir chogall Programming 2 02-17-2011 04:25 PM
how to create a driver makefile which uses header files outside current dir? netskink Linux - Kernel 5 05-21-2009 11:35 AM


All times are GMT -5. The time now is 09:39 PM.

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