Some bash
Posted on Tue 17 October 2017 in Notes
SSH escape sequences:
- to terminate a connection
~.
- to suspend ssh (fg to reactivate)
~^Z
- for other
~?
Find commands:
- today's files
$ find ~ -type f -mtime 0
- files older than 10 days
$ find ~ -type f -mtime +10
- todays's python files of the current directory in the next level of folder
$ find . -type f -maxdepth 2 -mtime 0 -iname '*.py'
Other stuff:
- press [Ctrl]+[V] [Tab] to make a tab character in bash
$ grep "[Ctrl]+[V] [Tab]" file
- remove sequence of ' ', cut the result line based on ' ' and display column 5 and 8
$ ls -al --sort=size /usr/bin | tr -s ' ' | cut -d ' ' -f 5,8