access to last touched or created file with arrow_up_key immediately after displaying the file list

lsa() { ls -lart; history -s "joe \"$(\ls -apt|grep -v /|head -1)\"" ; }
Display recursive file list (newest file displayed at the end) and be free to access last file in the list simply by pressing arrow_up_key i.e. open it with joe editor. BTW IMHO the list of files with newest files at the end is often more informative. Put this 'lsa' function somewhere in your .bashrc and issue . ~/.bashrc or source ~/.bashrc to have access to the 'lsa' command immediately. . (the function appends command "joe last_file_in_the_list" at the end of command history)

3
By: knoppix5
2016-07-07 21:27:55
ls

What Others Think

Hmm... This has promise. Finding the most recent file looks a bit clumsy, but I'm struggling to do any better. . Filtering out the directories isn't easy. I hoped that this would work: ls -I'*/' Ignore directory glob. Nope. ls -p | grep -v / will have to do . After you've filtered out the dirs, you can swap ls -tr | tail -1 for ls -t | head -1 which will be quicker. . Also, I suggest escaping the use of ls (to prevent unexpected behaviour). Lots of people have it aliased. lsa() { ls -lart; history -s "joe $(\ls -apt|grep -v /|head -1)" ; }
flatcap · 318 weeks and 5 days ago
Corrected. Thanx for the comment!
knoppix5 · 318 weeks and 5 days ago
great that i found this forum. People here are great. Learned alot. Keep posting more dentalimplantslubbocktx.com
Killersmile · 72 weeks and 1 day ago
This is a convenient way to go back, it is also great that there are other alternatives to make it easier. Langley Roofers
DanVillas · 50 weeks and 2 days ago
Hi there! Nice material, do keep me posted when you post something like this again! I will visit this blog leaps and bounds for more quality posts like it. Thanks... ??? ?????
KayGasaway · 27 weeks and 1 day ago
Welome to Tampa Seniors Care Where caregiving really counts Providing care to our clients in their homes requires a high level of trust and confidence in the services we provide and through the relationships we build. Know More Tampa Seniors Care Tampa Seniors care also carries out an exhaustive background check and carefully screens each http://tampaseniorscare.com/">private home care for seniors
wenilak444 · 24 weeks and 1 day ago
Luxor Vapors is Arlington's leading E-Cig store. Amazing selection, great products, and customer service. 3 locations in Arlington. Visit us today! vape coils Arlington
wenilak444 · 24 weeks and 1 day ago
Looking for the best and reliable VOIP Service for your organization? At Cloud Central LLC, We offer computer networking, VOIP Phone and Cloud services. http://cloudcentralllc.com/">Network and Security Solutions
yarosel701 · 23 weeks and 6 days ago
PawFinal. Enter using password. Enter store using password: Your password. Enter. Are you the store owner? Log in here. Opening soon. Pet Bathrobes
yarosel701 · 23 weeks and 6 days ago
That is lots of inspirational stuff. For no reason knew that opinions could be that varied. Thanks for all the enthusiasm to provide such helpful information here. Continue reading
nakav51247 · 23 weeks and 6 days ago
A way to make Web content and Web applications more accessible to people with disabilities. It especially helps with dynamic content and advanced user interface ... http://mycaretta.de/">camping teardrop
nakav51247 · 23 weeks and 5 days ago
A way to make Web content and Web applications more accessible to people with disabilities. It especially helps with dynamic content and advanced user interface ... camping teardrop
nakav51247 · 23 weeks and 5 days ago
A woman-owned wellness company focusing on Ayurvedic principles to enrich your life. An Ayurvedic Path Oracle Deck helps transform daily tasks into sacred ... Flower Arrangements Houston
nakav51247 · 23 weeks and 2 days ago
A superb advertising and marketing technique will help you enhance gross sales or generate leads for your online business. Media advertising and marketing ... Best PPC Tips and Strategies
nakav51247 · 23 weeks and 2 days ago
YEA Camp is a life-changing social justice leadership training for aspiring teen and adult activists who want to make a bigger difference in the world! summer camp for teens
nakav51247 · 23 weeks and 2 days ago
Browse new real estate properties and homes for sale on Andrew Guiant's website! View the latest available house listings! Sell your Las Vegas House
nakav51247 · 23 weeks and 2 days ago
Discover nokia mobile repair in UAE. Authorized Nokia Mobile Repair Center | 20+ Year of Trust Get the best Nokia mobile repair service in your doorstep or our axiom care Book your Nokia mobile repair now at affordable price at Axiom care.
nakav51247 · 22 weeks and 5 days ago
Axiom care – Genuine repairs with genuine parts. Visit Axiom care or Book online to avail repair service at your convenience. In case of your phones break down, we are authorized by Nokia to undertake all kind of Nokia mobile repair related issues right from basic hardware to software glitches.
gexeji53 · 18 weeks ago
Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com
seofox · 9 weeks and 4 days ago
Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com - Commandlinefu.Com
seofox · 9 weeks and 4 days ago

What do you think?

Any thoughts on this command? Does it work on your machine? Can you do the same thing with only 14 characters?

You must be signed in to comment.

What's this?

commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.

Share Your Commands



Stay in the loop…

Follow the Tweets.

Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.

» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10

Subscribe to the feeds.

Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):

Subscribe to the feed for: