Created
January 14, 2017 00:50
-
-
Save minademian/28f641709469d02f8cdf66246508c63c to your computer and use it in GitHub Desktop.
sanitize Linux directory listing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Sanitize a Linux directory listing so that it shows files, directories, and contents of subdirectories | |
# useful for sending a listing in an email, IM message, or online | |
^\-?[a-z]+(\s) # directory bit and file permissions | |
[0-9]{1}(\s) # directory counter, shows how many subdirectories this file has. | |
[a-z]+\s # owner | |
[a-z]+\s+ # group | |
[0-9]+\s+ # filesize | |
[a-z]+\s+[0-9]+\s+ | |
[0-9]+:?[0-9]+\s # date, last updated | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment