i just downloaded a basic list of commands for linux.
its called 12 essential commands for linux . sorrry , but i dont have the url.
a good one they forgot is killall. $ killaall your app. i have a cranky app called sea monkey , when i goto the silver apple or go command q only a certain part of the app dissapears . then i have to goto the app icon on the bar i have to force quit. i found if i goto terminal and type killall. the app behaves nicely and quits .
a little hint and kink. i have a printer that gets naughty now and then . one time it got stuck in standby for 5 hours . i remembered a trick from long a go is to pull the plug and cout to ten by thousands , then plug it back in. its like throwing a real hard switch that used to be on the sides of things . after i plugged the printer back in, it behaved .
usonian
(13,772 posts)YOU MADE ME LOOK.
Used to see killall only on MacOS.
The two seem to coexist everywhere.
in short kill PID, killall PROCESS_NAME
Printer software is none too smart, and I think they skimp on memory.
You may be clearing the effect of buffer overflow or memory leaks in the printer software.
FWIW, Apple has a lot of extra commands designed to run its hardware.
Not sure how up to date this list is, but it highlights commands unique to Apple:
https://ss64.com/osx/
Diskutil is in linux? Anyway it seems to get most things right.
For extra credit:
Apple changed the default shell somewhere in time. To change to to bash
chsh -s /bin/bash
It will ask for your password.
You can also do it in terminal->Preferences (now called Settings) -> Basic (you can change your shell there)
Things to learn: The find command. It's incredibly useful and tricky to get right.
You can batch rename files with the "ren" command written in perl. (It's not built-in)
I'll explain it separately. Saves days worth of work, but use with care
mv needs to be put into a loop to rename multiple files. That's where your SHELL means a lot. Scripts vary depending on your shell.
I used a lot of perl scripts to do chores independent of shells. Easier to read and program.
Hermit-The-Prog
(36,586 posts)MacOS is based on FreeBSD, so that explains that.
https://man.freebsd.org/cgi/man.cgi?query=killall&sektion=1
https://linux.die.net/man/1/killall
https://ss64.com/osx/killall.html
Now the oddball:
https://docs.oracle.com/cd/E88353_01/html/E72487/killall-8.html
Wonder Why
(4,589 posts)would give you a manual page on the command. In the old Unix days (Berkeley BSD 4 Unix), when you typed "man tunefs", one of the things it printed out on your screen was "You can tune a file system but you can't tuna fish". I believe they took that out in later years because it wasn't "professional".
The "make" command builds programs. Now, if you type "make love", you get:
$ make love
make: *** No rule to make target 'love'. Stop.
but in the old days it said "I don't know how to make love. Stop"
Mistermike
(16 posts)I so love Linux😃
Hermit-The-Prog
(36,586 posts)~$ whatis top
top (1) - display Linux processes
Shift-p will show you the most cpu-intensive processes
Shift-m will show you the most memory hogging processes
You can kill offenders by the pid shown in top.
(killall kills processes by name, which you might not know when they start misbehaving).
Sometimes-useful header information shown by top:
top - 06:17:35 up 70 days, 7:38, 0 users, load average: 0.19, 0.52, 0.52
Tasks: 164 total, 5 running, 159 sleeping, 0 stopped, 0 zombie
%Cpu(s): 3.4 us, 1.7 sy, 0.0 ni, 94.9 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
MiB Mem : 3930.1 total, 1111.3 free, 1189.2 used, 1629.6 buff/cache
MiB Swap: 2947.5 total, 2863.0 free, 84.5 used. 2600.2 avail Mem
Ok, so I'm using an ancient, memory starved system. It's working for now.