Check These Out
Return the creation date of a file on ext2, 3, 4 filesystems, because stat command won't show it.
Useful on ubuntu, debian, and else
Yet another ps grep function, but this one includes the column headings.
Simply sourcing .bashrc does not function correctly when you edit it and change an alias for a function or the other way round with the *same name*.
I therefor use this function. Prior to re-sourcing .bashrc it unsets all aliases and functions.
I always wanted to be able to copy formatted HTML, like from emails, on trello cards or READMEs... but the formatting is always wrong... But from this two links:
* https://jeremywsherman.com/blog/2012/02/08/pasting-html-into-markdown/
* http://stackoverflow.com/questions/3261379/getting-html-source-or-rich-text-from-the-x-clipboard
For instance, to to copy an formatted email to a trello card, just:
1. Select the email body
2. run: xclip -selection clipboard -o -t text/html | pandoc -f html -t markdown_github - | xclip -i -t text/plain
3. Paste in your trello card
4. Profit!
8-)
"-n" loops around ; "-e" executes the given quoted string ; "$_" is the current line ; "split" creates an array on white space; each item of the array is "collected" to be then "capitalized" ; the array is "joined" back into a string.
I often deal with long file names and the 'ls -l' command leaves very little room for file names. An alternative is to use the -h -o and -g flags (or together, -hog).
* The -h flag produces human-readable file size (e.g. 91K instead of 92728)
* The -o suppresses the owner column
* The -g suppresses the group column
Since I use to alias ll='ls -l', I now do alias ll='ls -hog'
Part of the "atool" package.
trap is the bash builtin that allows you to execute commands when the current script receives a particular signal.
Uses $0 for the script name, $$ for the script PID, tee to output to STDOUT as well as a log file and ps to log other running processes.
Alternatively,
$ ls -F | grep /\$
but will break on directories containing newlines. Or the safe, POSIX sh way (but will miss dotfiles):
$ for i in *; do test -d "./$i" && printf "%s\n" "$i"; done