Timeline for Get most recent file in a directory on Linux
Current License: CC BY-SA 4.0
37 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jan 31 at 3:00 | answer | added | Lenik | timeline score: 0 | |
Jan 31 at 2:41 | answer | added | Tom Hale | timeline score: 2 | |
Dec 4, 2022 at 7:44 | answer | added | Akash Soori | timeline score: 1 | |
Sep 16, 2022 at 23:16 | comment | added | bballdave025 |
@kvantour , I had the same concern. However, the answer from @Stephane_Chazelas uses -printf with \0 at the end of the output - basically making it a formatted -print0 . For me, it's a lot easier - or at least more elegant - to put the newest (or oldest) filename into a string using what @Stephane_Chazelas shared rather than using BashFAQ/099. Any comments on this are welcome ... in the chat. (P.S. BashFAQ/099 is a great answer and something that I think everyone should know about, by the way.)
|
|
Aug 21, 2022 at 18:54 | history | rollback | Chris Stryczynski |
Rollback to Revision 3
|
|
Aug 21, 2022 at 18:54 | history | edited | Chris Stryczynski | CC BY-SA 4.0 |
improve title
|
Jul 25, 2022 at 14:24 | answer | added | Kasthuri Shravankumar | timeline score: -1 | |
Dec 16, 2021 at 9:47 | comment | added | meolic | newer but similar question is here: Bash script to find and display oldest file | |
Sep 14, 2021 at 7:02 | comment | added | Basj | Also very useful: unix.stackexchange.com/questions/29899/… | |
Jul 8, 2020 at 15:19 | comment | added | kvantour |
Most answers here parse the output of ls or use find without -print0 which is problematic for handling annoying file-names. Always useful to mention: BashFAQ099 which gives a POSIX answer to this problem
|
|
Jul 8, 2020 at 15:17 | answer | added | Benjamin W. | timeline score: 4 | |
Jul 8, 2020 at 15:08 | history | edited | Benjamin W. | CC BY-SA 4.0 |
edited tags
|
Mar 17, 2020 at 13:19 | answer | added | OASE Software GmbH | timeline score: 7 | |
Apr 15, 2019 at 16:56 | answer | added | João Fonseca | timeline score: 1 | |
Oct 15, 2018 at 2:43 | history | edited | jww | CC BY-SA 4.0 |
Tags in title (http://meta.stackexchange.com/q/19190).
|
Feb 1, 2018 at 8:54 | answer | added | mebada | timeline score: 3 | |
Jan 26, 2018 at 5:29 | answer | added | jasonleonhard | timeline score: 1 | |
Nov 17, 2016 at 10:52 | answer | added | Konki | timeline score: 4 | |
Sep 7, 2016 at 15:41 | answer | added | Dmytro G. Sergiienko | timeline score: 8 | |
Aug 17, 2016 at 12:28 | answer | added | Stephane Chazelas | timeline score: 33 | |
Apr 25, 2016 at 12:22 | answer | added | xb. | timeline score: 1 | |
Oct 20, 2015 at 7:42 | history | protected | Aniket Thakur | ||
Mar 13, 2015 at 17:46 | answer | added | Patrick | timeline score: 9 | |
Nov 21, 2014 at 4:05 | answer | added | Richard Servello | timeline score: 3 | |
Oct 24, 2014 at 13:50 | answer | added | basic6 | timeline score: 1 | |
Oct 21, 2014 at 1:15 | answer | added | masoomeh vahid | timeline score: -1 | |
Oct 1, 2014 at 9:53 | answer | added | TrueY | timeline score: 6 | |
Jul 31, 2014 at 7:07 | answer | added | RICHA AGGARWAL | timeline score: 2 | |
Apr 12, 2014 at 18:15 | answer | added | gioele | timeline score: 187 | |
Dec 10, 2013 at 0:34 | answer | added | MikeB | timeline score: 10 | |
Jul 5, 2012 at 19:52 | comment | added | user285594 |
watch -n1 'ls -Art | tail -n 1' - shows the very last files
|
|
Apr 29, 2012 at 15:31 | answer | added | user1195354 | timeline score: 11 | |
Jun 18, 2009 at 23:21 | answer | added | Jared Oberhaus | timeline score: 8 | |
Jun 18, 2009 at 23:21 | vote | accept | ack | ||
Jun 18, 2009 at 23:18 | answer | added | chaos | timeline score: 277 | |
Jun 18, 2009 at 23:17 | answer | added | dmckee --- ex-moderator kitten | timeline score: 468 | |
Jun 18, 2009 at 23:15 | history | asked | ack | CC BY-SA 2.5 |