Command research thread

Post Reply
Posts: 10
Joined: Fri Sep 24, 2010 1:26 pm

Command research thread

Post by Amusesmile » Wed Sep 29, 2010 11:30 am

Useful: cmp- compares two files byte by byte and finds any differences. I can see this being really useful for different versions of something or in case a file gets corrupted during copying, etc. Maybe not too useful anymore but back in the day...

useful options: -b lists the differing bytes themselves; -l outputs the actual byte numbers and values which differ
Weird: dumper- this "can be used to create a core dump of running windows processes." Seems like its useful for real system-level debugging or something, but I can't make heads or tails. Cygwin says that it can be set to automatically dump every time an error occurs or something, so that you can later see what happened if it crashes I guess.
Nonsensical: false- "do nothing, unsuccessfully" That's seriously the description. "Exit with a status code indicating failure" This might be some sort of early 90s programming joke...

Alright "info false" gives more information: "It can be used as a placeholder in shell scripts where an unsuccessful command is needed." Maybe that will make sense when we get into deeper programming.

Posts: 6
Joined: Thu Sep 23, 2010 10:13 pm

Re: Command research thread

Post by GatesWinkler » Wed Sep 29, 2010 6:57 pm

Chcon – Change file security context
I guess this is a way to change security settings on a file. This is probably useful for securing files beyond the usual file permissions. It probably adds a level of protection on files that the user wants to be especially protected.

Shuf – Generate random permutations
This seems like a way to test shell code programs. It generates random inputs for a program to ensure that it can deliver the proper outputs.

Doesn’t Make Sense:
Xargs – Build and execute command lines from standard input
I don’t understand what that means, does it take some sort of set of instructions a user provides and makes them into proper command line functions? What is the point of that? If a person is running this xargs command from the terminal, they probably already know or can look up the unix commands, rather than have to provide instructions in a different format

Posts: 15
Joined: Sat Sep 25, 2010 7:08 pm

Re: Command research thread

Post by mhetrick » Wed Sep 29, 2010 11:21 pm

Very Cool!:
top - Lists all processes running on the machine! This is handy for me, as I still haven't found a way for doing this on a Mac. Not that I've really looked, but I've always loved Windows Task Manager. This'll do for now.

Kind of Cool!:
gawk - Find and Replace text within files. Perhaps the best bash command for merry pranksters, those who hate their roommates, or those who realize that they've been spelling something wrong their whole life.

cal - prints a calendar. Not useless. Could come in handy if you are adding a date to a file, but seems superfluous with the date in the top right corner of your screen (or via Dashboard or widgets or whatever you want). Nice to have it in one place, I guess.

What is this, I don't even…:
mkfifo - Apparently, you can make a FIFO with it! Cool! Oh wait, what is a FIFO? Apparently, it is a pipe. Or something. But it's a file. What?

Posts: 2
Joined: Sun Sep 26, 2010 12:03 pm

Re: Command research thread

Post by sanmay » Wed Sep 29, 2010 11:37 pm

Last- Show listing of last logged in users. Kind of cool to monitor the activities in your absence.

It prints the contents of X events. I guess its useful for seeing what causes to event happen.

Doesn't make sense-
Prints current time in each time zone named on command line. I didn't understand what this means.If it means general, then its unnecessary with a clock in your right hand corner on desktop.

Posts: 6
Joined: Fri Sep 24, 2010 3:25 pm

Re: Command research thread

Post by tobiast » Thu Sep 30, 2010 8:09 am

kill - Terminate or signal a process. Useful if the process does not respond. The kill command takes a PID (Process ID) which can be found using the top command already described or ps (process status).

whoami - display effective user id. To me it seems kinda like a Matrix thing.. Who am I?

Doesn’t Make Sense:
rev - Reverse lines of a file. Takes standard input if file not specified. E.g. Hello World > dlroW olleH

I just want to add this funny command:
banner - Print large banner on printer. Prints huge ASCII banner to the standard output.

This one is mac only:
say -v Good 011101010101000110101111010100

Posts: 12
Joined: Thu Apr 08, 2010 10:07 am

Re: Command research thread

Post by james » Thu Sep 30, 2010 10:14 pm

whatis [command] - summarized explanation of a command (seems to be the content that is pulled up when you use a command incorrectly)

screen - some sort of shell program that still seems to allow basic unix commands, but apparently allows multiple connections to something or other...

Doesn't Make Sense:
apropos [command] - similar to the whatis command, but seems to pull up the summarized manual content for all commands that reference the command your looking up, and lots of other stuff...

Posts: 5
Joined: Thu Sep 23, 2010 8:11 pm

Re: Command research thread

Post by f.myles » Sun Oct 03, 2010 7:31 pm

xmms - mp3 player in unix

big brother!
w --- tells you who's logged in, and what they're doing. Especially useful: the 'idle' part. This allows you to see whether they're actually sitting there typing away at their keyboards right at the moment.

Doesn't make sense:
tr - translate characters...Not exactly sure about this one....

Posts: 43
Joined: Fri Apr 02, 2010 1:54 pm

Re: Command research thread

Post by angus » Sun Oct 03, 2010 11:09 pm

Most of the man pages have an "EXAMPLES" section which can provide insight into the commands when the description is vague or context is unclear.

Post Reply