Skip to content

FAQforge

  • Site Notice
  • Privacy Policy

bash

How to clear Bash history on Linux?

by Till Brehm

The bash history is a log file that contains all commands that the user executed on the Linux shell. When you use the "arrow up" key on our keyboard, then Bash will look up the previous command from that file and display it on the screen, ready to be executed again.

Read more

Categories Basics, CentOS, Debian, Distributions, Linux & Unix, Ubuntu Tags bash, Shell Leave a comment

Get the name of the newest file in a directory on the linux shell

by Till Brehm

If you have a directory with many files (a few thousand in my case) and need to know which one is the newest, then the following command might be useful. It returns the name and details of the newest file in a directory where it is executed: ls -tl | sed -n 2p

Categories Basics, CentOS, Debian, Distributions, Linux & Unix, Ubuntu Tags bash, Shell, shellscript 5 Comments

Popular Tutorials

  • Find and Open Files using Windows Command Prompt
  • How to Take High-Resolution Screenshots in Windows 10
  • How to Shut Down Windows 10 with the Shutdown Timer
  • Windows Powershell – “Running scripts is disabled on this system”
  • How to Configure NTP Server in Windows Server 2016
  • How to Create a PowerShell Session on a Remote Computer
  • Fix “The program can’t start because MSVCR100.dll is missing from your computer.” error on Windows
  • How to change the default font in Windows 10
  • How to Exclude a User or Computer from Group Policy Object
  • How to Update ISPConfig 3

Categories

  • Android
  • Basics
  • CentOS
  • Controlpanels
  • Debian
  • Distributions
  • Email
  • FTP
  • iPad & iPhone
  • ISPConfig 2
  • ISPConfig 3
  • Linux & Unix
  • Mac OS X
  • Microsoft Exchange Server 2016
  • MySQL
  • O365
  • PostgreSQL
  • PowerShell
  • Programming
  • Server
  • Ubuntu
  • Uncategorized
  • Virtualisation
  • Vista
  • Webserver
  • Windows
  • Windows 10
  • Windows 7
  • Windows 8
  • Windows Server 2012 R2
  • Windows Server 2016
  • XP
© 2021 FAQforge • Built with GeneratePress