Handy “ls” arguments on *nux

I am constantly checking logs when software testing. Some software creates a new log file every time there is an new event. This sends me crosseyed trying to figure out which is the latest log that I want to view.

Here is the trick

type “ls -ltr”

l = List (Single column and easy to view)

t = Sort by time

r = Reverse the order of the search (So that the log you want is listed last, just above your prompt)

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s