Check These Out
This gives a very rough estimate of how many pages your text files will print on. Assumes 60 lines per page, and does not take long lines into account.
in command mode, navigate your cursor to the line where you want the command output to appear, and hit "!!". No need to enter edit mode or even type a ":" (colon).
If you want to create fast a very big file for testing purposes and you do not care about its content, then you can use this command to create a file of arbitrary size within less than a second. Content of file will be all zero bytes.
The trick is that the content is just not written to the disk, instead the space for it is somehow reserved on operating system level and file system level. It would be filled when first accessed/written (not sure about the mechanism that lies below, but it makes the file creation super fast).
Instead of '1G' as in the example, you could use other modifiers like 200K for kilobytes (1024 bytes), 500M for megabytes (1024 * 1024 bytes), 20G for Gigabytes (1024*1024*1024 bytes), 30T for Terabytes (1024^4 bytes). Also P for Penta, etc...
Command tested under Linux.
Because entering ':' requires that you press shift, sometimes common command-line / mini-buffer commands will be capitalized by accident.
Default output-file is "liveh.txt".
This uses only BRE, in case you're using an older version of sed(1) that doesn't have support for ERE added.
With a modern sed(1), to reduce false positive matches, you might do something like:
liveh(){ tcpdump -lnnAs512 -i ${1-} tcp |sed 's/.*GET /GET /;s/.*Host: /Host: /;s/.*POST /POST /;/GET |Host: |POST /!d;/[\"'"'"]/d;/\.\./d;w '"${2-liveh.txt}"'' >/dev/null ;}
Anyway, it's easy to clean up the output file with sed(1) later.
Using this command you can track a moment when usb device was attached.
An alternative to built-in package manager, keep pandoc in sync with upstream releases.
Create a tarball on the client and send it across the network with netcat on port 1234 where its extracted on the server in the current directory.