LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
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 08-06-2012, 07:37 PM   #1
kamaleshbv1
LQ Newbie
 
Registered: Apr 2011
Posts: 29

Rep: Reputation: 0
Move odd files in a directory to a different directory


Hello all,

I just need some info on moving all odd files to "directory" (to be clear, odd numbered file are files that end with 1 3 5 7 or 9). Please help
 
Old 08-06-2012, 07:52 PM   #2
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,240

Rep: Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324
Sounds a bit like homework; can you show us what you've tried so far and what happened.
https://www.linuxquestions.org/linux/rules.html
 
Old 08-06-2012, 07:53 PM   #3
kamaleshbv1
LQ Newbie
 
Registered: Apr 2011
Posts: 29

Original Poster
Rep: Reputation: 0
no no this is not a home work . I am working with awk, but thats not getting right. So thought that you guys might help
 
Old 08-06-2012, 07:56 PM   #4
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,240

Rep: Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324
No worries, but show us your code and the results, so we can help you fix it
 
Old 08-06-2012, 08:01 PM   #5
kamaleshbv1
LQ Newbie
 
Registered: Apr 2011
Posts: 29

Original Poster
Rep: Reputation: 0
mv *[135] /home

---------- Post added 08-06-12 at 07:02 PM ----------

I was wondering if we could do , with out giving the numbers
 
Old 08-06-2012, 08:07 PM   #6
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,240

Rep: Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324
Now I'm confused; that's definitely not awk ...
 
Old 08-06-2012, 08:18 PM   #7
kamaleshbv1
LQ Newbie
 
Registered: Apr 2011
Posts: 29

Original Poster
Rep: Reputation: 0
ok, thats not an awk script. But i executed a different one which doesnt work..and i dont have it
 
  


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
move all files in current directory into a subdirectory in the current directory jakykong Linux - Newbie 8 07-17-2013 12:46 AM
move files of a particular directory visitnag Linux - Desktop 17 09-27-2008 10:24 PM
move files of a particular directory visitnag Programming 2 08-25-2008 10:45 PM
move files of a particular directory visitnag Programming 1 08-24-2008 03:02 PM
Move directory of files siva19185 Linux - Newbie 3 07-02-2008 03:59 AM


All times are GMT -5. The time now is 04:45 AM.

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