|
|||||||
| Forums | Search Forums | Register | Forum Rules | Man Pages | Albums | FAQ | Members | Calendar | Search | Today's Posts | Mark Forums Read |
| Solaris The Solaris Operating System, usually known simply as Solaris, is a Unix-based operating system introduced by Sun Microsystems. The Solaris OS is now owned by Oracle. |
|
|
|
Thread Tools | Search this Thread | Display Modes |
|
#8
|
||||
|
||||
|
May be Jim missed something... Code:
dest=/path/to/september/
touch -t 201209010000 /tmp/d1
touch -t 201209302359 /tmp/d2
find /path/to/files -type f -newer /tmp/d1 \! -newer /tmp/d2 | while read fname
do
mv "$fname" "$dest"
done |
|
#9
|
|||
|
|||
|
Thanks elixir!
It is working fine for the september files. I need to move the other month files also needs to be moved to the respective folders. Please help me to do this. ---------- Post updated at 09:03 AM ---------- Previous update was at 08:59 AM ---------- Quote:
pls help me such a way to resolve this issue. Thanks! |
|
#10
|
||||
|
||||
|
Code:
ls -lrt | awk -v '/^\-/{print $6,$NF}' | while read month filename
do
mkdirp -p /full/path/${month}_bkp_files
mv ${filename} /full/path/${month}_bkp_files
done |
|
#11
|
|||
|
|||
|
Quote:
mv: cannot stat 'test.edi': No such file or directory getting the above error |
![]() |
| Tags |
| script from ksh, solaris 10 |
| Thread Tools | Search this Thread |
| Display Modes | |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Move files to Folders | diva_thilak | Shell Programming and Scripting | 5 | 07-23-2009 01:53 AM |
| Move folders containing certain files | xavix | UNIX for Dummies Questions & Answers | 3 | 02-21-2009 05:43 AM |
| How do you move lines of numbers based on the month | terryporter51 | Shell Programming and Scripting | 11 | 06-15-2008 12:54 AM |
| how to move files into different folders based on filename | italia5 | UNIX for Dummies Questions & Answers | 7 | 08-23-2006 10:04 AM |
|
|