What is the meaning of following
ls -l *\:2,*T
-l= long (list)
Tat the end
But what about that
*\:2 and the comma?
Super User is a question and answer site for computer enthusiasts and power users. It only takes a minute to sign up.Sign up to join this community
*\:2,*T is the glob pattern of files to list. To understand it, we need to remember a few things:
:has to be escaped in the shell, becoming
*\:2,*T would e.g. match a file called
From the comments, the necessity (or not) of escaping the
: needs a few words: It is not strictly necessary to escape the
: sign, but bash itself suggests it when autocompleting.
List all files that match the wildcard pattern
There the wildcard
* matches anything (any number of all possible characters)
:2, are characters that need to be present in the file/directory names.
: is a special character that needs to be escaped, hence the form of
The file/directory names need to end with a
File names that would match would be
:2,T a:2,T a:2,bT abbY-$fafaf:2,<hskjhsgdfhjk>T
As others have noted, this will list in long format, files containing
:2, and ending in
This looks like a search in a Maildir folder for files that were deleted (trashed). However, for robustness it should have had another
* at the end, though. New flags with a later alphabetical position could be added, and Dovecot for instance adds another field with the file size at the end.