Skip to main content

New answers tagged

3 votes
Accepted

Opening .xlsx file in linux terminal

xlsx is actually a zip file containing a directory structure of XML documents, describing different aspects of your spreadsheet. Yes, you can unzip these files into a directory, and access the XML ...
Marcus Müller's user avatar
0 votes

How to verify a checksum using one command line?

Building on this: sha256() { printf '%s %s\n' "$1" "$2" | sha256sum --check } You can also add this function sha256() { sha256sum "$1" | sed "s| .*| $2|&...
seali33's user avatar
0 votes

How to configure hostapd.conf for wps push button?

Here is a minimal setup: ctrl_interface=/var/run/hostapd wps_state=2 config_methods=virtual_push_button It is then possible to use hostapd_cli to push the virtual button. Run hostapd_cli without ...
Tobu's user avatar
  • 6,670
1 vote

Sunrise and other astronomical data from the command line

FYI on macOS (at least 14.6.1): % /usr/libexec/corebrightnessdiag sunschedule Night Shift Sunset/Sunrise { isDaylight = 0; nextSunrise = "2024-09-12 20:04:10 +0000"; nextSunset = ...
Ben L's user avatar
  • 11
0 votes

Why am I not able to change the shell with the chsh command?

I've also had success on some systems with ypchsh These systems usually use NIS, and you can sort of figure out that something is wrong b/c chsh gives a permission denied error.
gbronner's user avatar
  • 121
1 vote
Accepted

Command-line option to disable too many processes in htop

There is no command-line option in htop to do this, not even an undocumented option. As noted by Kamil Maciorowski, if you start htop once, toggle the display of threads (H), and exit, the setting is ...
Stephen Kitt's user avatar
0 votes

Is there a robust command line tool for processing csv files?

This is a fix for Alpaca's earlier answer which was on the right track, but didn't actually work. $ printf 'c0,c1,c2\n"this, is the first entry", this is the second, 34.5' | sqlite3 -cmd '....
Derek Mahar's user avatar
0 votes

Is there a robust command line tool for processing csv files?

DuckDB can query CSV files directly, including from standard input on Unix like operating systems: $ echo '"this, is the first entry", this is the second, 34.5' | duckdb -c 'SELECT * FROM ...
Derek Mahar's user avatar
0 votes

Is there a robust command line tool for processing csv files?

csvtk can read and process CSV files and csvtk cut in particular can select specific columns from an input CSV file: $ echo '"this, is the first entry", this is the second, 34.5' | csvtk ...
Derek Mahar's user avatar
0 votes

Can I run GUI programs without needing a desktop environment?

You can run them on a virtual server: Install: xorg-server-xvfb Then run: xvfb-run [command]
Alberto Salvia Novella's user avatar
0 votes

Make a bootable USB on Kali Linux

I've created a script get the job done especially for you <3 all you have to do is type this down in the terminal: git clone https://gist.github.com/c2205135f27e5377bf0f7101182256a2.git cd ...
ammar0xff's user avatar
2 votes

Looking to add or append terms in multiple lines using sed command

sed '/User1/s/$/ User2/' file Would append User2 to lines that contain User1 but note that these lines also contain User1: ControlUser1.5: alice joe foo: User12 bar: OtherUser1 So it should ...
Stéphane Chazelas's user avatar
3 votes

High CPU usage by process with obfuscated name on Linux server – Potential attack?

My answers: no; garbled command names is nothing new and that alone does not mean it is malware. As for it being unknown... you see a UFO does that mean it's aliens coming to take over no, it just ...
ron's user avatar
  • 7,423
44 votes

High CPU usage by process with obfuscated name on Linux server – Potential attack?

There was a very similar question in this site few years ago: Process with weird random name consuming significant network and CPU resources. Is someone hacking me?. In that specific question, there ...
aviro's user avatar
  • 6,502
1 vote

Pausing terminal output

You can use tee to log all outputs in a file and as well as show in console. This doesn't pause the program like XON/XOFF flow controls or less (as pausing may cause issue in program like timeout)
hiru007's user avatar
  • 11
4 votes

Could linux give clearer error messages to distinguish files from directories?

In mkdir’s case, the underlying mkdir function doesn’t distinguish files from directories; it returns an error, EEXIST, corresponding to “File exists”. In rm’s case, the removal fails with an EISDIR ...
Stephen Kitt's user avatar
0 votes

Markdown Viewer

Markdown Document Renderer (MDR) A fast, light-weight option is mdr. Some things I really like about mdr compared to other alternatives: It's available in most package managers and/or is easily ...
guttermonk's user avatar
0 votes

Trying to mount a drive, but Mint can't find it?

First, check to see if sdb1 and sdb2 are in /proc/partitions. If they are, the problem lies in creation (or removal of) of the device nodes. If they are not, try running partprobe /dev/sdb as root. ...
David G.'s user avatar
  • 1,716
2 votes

How to launch a GUI-application from terminal while keeping the terminal on the front and the cursor on terminal

As long as you're in a graphical context, and don't plan to close your shell right away, the old, traditional & will do the trick. mupdf somepdffile.pdf & mupdfpid=$! I'm having you save the ...
waltinator's user avatar
  • 5,490
0 votes

Print UTF-8 file with command line tools

Here is a small shell script I use since more than 20 years for old printers who don't manage UTF-8 ( source pr8.sh, installed as /opt/bin/pr8 ) : #!/bin/sh case $1 in -r) opts="$1" ...
athena's user avatar
  • 1,000

Top 50 recent answers are included