- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: How to move pertuclar date files in folder
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-18-2009 06:53 AM
06-18-2009 06:53 AM
How to move pertuclar date files in folder
I have so many files in one folder. i want to move/delete some files which is created in perticular date, it is very difficult to move/delete one by one files. If i use *.* all files are moving which i dont want..
thanking you in advance...
Regards
Vinay
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-18-2009 07:08 AM
06-18-2009 07:08 AM
Re: How to move pertuclar date files in folder
I know there are probably easier ways to do what I think you want, but here's what popped into my head;
for i in $(ll|awk '$6 ~/mmm/ && $7 ~ /dd/ {print $9}')
do
rm $i
done
The "mmm" is for the month and the "dd" is for the day. And you could subsitute "mv" for the "rm".
Beers,
robert
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-18-2009 07:10 AM
06-18-2009 07:10 AM
Re: How to move pertuclar date files in folder
ls -lrt > x
vi x
remove the name of the which u dont want to delete.
save and quit
cut -c59- x > x1
vi x1
:%s/^/rm"space"
save and quit
sh -x x1
Regards,
Durvesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-18-2009 08:17 AM
06-18-2009 08:17 AM
Re: How to move pertuclar date files in folder
To find/remove/move files for a particular date, you could do (for example):
# touch -mt 200904010000.00 /tmp/ref1
# touch -mt 200904012359.59 /tmp/ref2
# find /path -xdev -type f -newer /tmp/ref1 -a ! -newer /tmp/ref2 -exec rm {} +
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-23-2009 03:25 AM
06-23-2009 03:25 AM
Re: How to move pertuclar date files in folder
Just use;
mv `ls -lrt|grep "June 19" |awk '{print $9}'`
/test
this will all files dated june 19 to folder /test..
Njy...