Is there an equivalent of tail -f on Windows?

In Powershell you can use Get-Content with the -Wait flag: Get-Content filename.log -Wait You can shorten Get-Content to gc. That question suggested as a possible duplicate has an answer which mentions this and some useful extra parameters – see https://stackoverflow.com/a/188126. I’m not sure if it’s really a duplicate, though, since that question is talking about … Read more

Is it possible to prefill a input() in Python 3’s Command Line Interface?

If your Python interpreter is linked against GNU readline, input() will use it. In this case, the following should work: import readline def input_with_prefill(prompt, text): def hook(): readline.insert_text(text) readline.redisplay() readline.set_pre_input_hook(hook) result = input(prompt) readline.set_pre_input_hook() return result

Keyboard shortcut to “Comment” a line in NANO?

The simplest workaround I’ve found: Comment-out: set the cursor at the first row that should be commented-out hit twice ‘M-R’ (or ‘Alt-r’; in order to Replace a RegExp) Search for: ‘^’ Replace with: ‘# ‘ Replace this instance?: ‘y’ press ‘y’ for each row to be commented-out Comment-in: The same procedure, replacing ‘# ‘ by … Read more

Extract .xip file into a folder from command line?

Maybe try: xip -x [path to .xip file] That will unpack the archive into your current working directory. As for extracting into a specific directory, there is not explicitly an option for this, but xip -x will extract into the current working directory. Therefore, cding to where you would like to extract the file should … Read more