|
|||||||
| Forums | Search Forums | Register | Forum Rules | Man Pages | Albums | FAQ | Members | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
|
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Listing based on User and Date
listing based on user. I have files in some folder that come from many user Code:
-rwxrwxr-x 1 ratih pbank 4827112 Jun 8 08:37 S92TA-8.sgy -rwxrwxr-x 1 ratih pbank 4724568 Jun 8 08:37 S92TA-6.sgy -rwxrwxr-x 1 ratih pbank 4929656 Jun 8 08:37 S92TA-19.sgy -rwxrwxr-x 1 ratih pbank 9820216 Jun 8 08:37 S92TA-5.sgy -rwxrwxr-x 1 ratih pbank 4929656 Jun 8 08:37 S92TA-17.sgy -rwxrwxr-x 1 ratih pbank 6286392 Jun 8 08:37 S92TA-1.sgy -rwxrwxr-x 1 ratih pbank 4827112 Jun 8 08:37 S92TA-10.sgy -rwxr-xr-x 1 aiprawira pbank 6106640 Jun 26 08:50 S92JA-002.sgy -rw-r--r-- 1 aiprawira pbank 1240080 Aug 30 10:11 S74JA-009.sgy -rwxrwxr-x 1 aliyyus pbank 1531440 Sep 12 09:29 S78JA-018_1.SGY -rwxrwxr-x 1 aliyyus pbank 2295360 Sep 12 09:29 S78JA-016.SGY -rwxrwxr-x 1 aliyyus pbank 2006768 Sep 12 09:29 S78JA-014_1.SGY -rwxrwxr-x 1 aliyyus pbank 1514464 Sep 12 09:29 S78JA-018_2.SGY what command should I use to make listing for particular user and particular date |
| Sponsored Links | ||
|
|
#2
|
||||
|
||||
|
simply using grep with ls, or more tricky using the command find... With grep precedance is important (is it date or user most important?) but since you want 2 conditions hte importance is less except for performance... (like in sql language...) You could try to see: Code:
ls -l |grep <date> | grep <user> Last edited by vbe; 10-11-2012 at 10:11 AM.. Reason: code tags gone in copy /paste... |
| Sponsored Links | ||
|
|
#3
|
|||
|
|||
|
Try like... Code:
ls -ltr| awk '{if($3=="ratih") print}' |
|
#4
|
|||
|
|||
|
Quote:
|
| Sponsored Links | |
|
|
#5
|
|||
|
|||
|
Quote:
Code:
touch -t 201205312359.59 __start__ touch -t 201209010000 __end__ Then if you run ls -lrt you will see the files you want between the listings for __start__ and __end__. If you want files in a file hierarchy not limited to the current directory, you can use something like: Code:
find <directory_list> -newer __start__ ! -newer __old__ to give you a list of files you want. |
| Sponsored Links | ||
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Search on date range of file based on user input | lostincashe | Shell Programming and Scripting | 5 | 03-30-2012 03:03 PM |
| Listing file name and date | Jfka | UNIX for Dummies Questions & Answers | 3 | 01-20-2011 05:54 AM |
| listing Directory chronologically based on part of file name | Reddy482 | Shell Programming and Scripting | 3 | 11-10-2010 01:21 PM |
| Listing tomorrows date | theninja | UNIX for Advanced & Expert Users | 2 | 07-08-2009 05:23 PM |
| long listing of files up to a given date | rlh | UNIX for Dummies Questions & Answers | 2 | 10-27-2000 09:43 AM |
|
|