Skip to content
David Kittell
David Kittell

Application & System: Development / Integration / Orchestration

  • Services
    • Application Development
    • Online Application Integration
  • Code
  • Online Tools
  • Tech Support
David Kittell

Application & System: Development / Integration / Orchestration

UNIX Bash – Get Latest File Name Based On DateTime

Posted on July 7, 2016 By David Kittell

Working on a backup and restore script I often need only to know what the latest backup/archive file is, this command helps you learn that.

ls -ltr | tail -1 |cut -d' ' -f10
All information on this site is shared with the intention to help. Before any source code or program is ran on a production (non-development) system it is suggested you test it and fully understand what it is doing not just what it appears it is doing. I accept no responsibility for any damage you may do with this code.

Related

CentOS Code Fedora Mac OS X Shell Mac OSX Red Hat Ubuntu UNIX UNIX Shell Scripts

Post navigation

Previous post
Next post

Related Posts

PHP WordPress – Check If MultiSite From CLI

Posted on November 3, 2015

require(dirname(__DIR__) . ‘/html/wp-config.php’); if(defined(‘WP_ALLOW_MULTISITE’)) { if (constant("WP_ALLOW_MULTISITE") == true) { echo "\nThis site is MultiSite\n"; } else { echo "\nThis site is not MultiSite\n"; } } else { echo "\nThis site is not MultiSite\n"; } All information on this site is shared with the intention to help. Before any source…

Read More

Mac OSX Terminal – Lynx HTML Parsing

Posted on January 1, 2018

Lynx has a lot of good purposes but in this example below I’m simply going to strip URLs from a bookmarks HTML file exported from Chrome. brew install lynx lynx -dump -nonumbers -listonly bookmarks_11_18_16.html > links1.txt If you have created folders and links all over the place in Chrome or…

Read More

PowerShell Download File and Extract File

Posted on September 17, 2015

Grabbing code from Powershell Download Script and Powershell Extract Zip Files this script will download with the option of extracting the zip file. In PowerShell if you type the following you will get two examples of how to use the code. get-help DownloadFileExtractFile.ps1 -examples <# .SYNOPSIS Downloads one file from…

Read More

Code

Top Posts & Pages

  • PowerShell - Rename Pictures to Image Taken
  • Front Page
  • PowerShell - IIS Remove Site
  • SQLite - Auto-Increment / Auto Generate GUID
  • PowerShell - FTP Upload Directory With Sub-Directories

Recent Posts

  • Javascript – Digital Clock with Style
  • BASH – Web Ping Log
  • BASH – Picture / Video File Name Manipulation
  • Mac OSX Terminal – Create SSH Key
  • Bash – Rename Picture

Top Posts

  • PowerShell - Rename Pictures to Image Taken
  • PowerShell - IIS Remove Site
  • SQLite - Auto-Increment / Auto Generate GUID
  • PowerShell - FTP Upload Directory With Sub-Directories
  • Raspberry Pi - Remove Default Apps
  • PowerShell - Change Windows CD/DVD Drive Letter
©2025 David Kittell | WordPress Theme by SuperbThemes