USA Linux Users Group Forum Index
Log in Register FAQ Memberlist Search USA Linux Users Group Forum Index Album

Obscure Linux Commands:
Goto page Previous  1, 2
 
Post new topic   Reply to topic   printer-friendly view    USA Linux Users Group Forum Index » Command Line Commands
View previous topic :: View next topic  
Author Message
exiled
Jr. Member


Joined: 24 Nov 2024
Posts: 51
Location: ~/

PostPosted: Tue Dec 01, 2024 12:07 am    Post subject: Reply with quote

How about the magic cookie?
This might actually be of some use, so I'll keep it in mind.

mcookie

NAME
mcookie - generate magic cookies for xauth

SYNOPSIS
mcookie [-v] [-f filename ]

DESCRIPTION
mcookie generates a 128-bit random hexadecimal number for use with the
X authority system. Typical usage:
xauth add :0 . `mcookie`

The "random" number generated is actually the output of the MD5 message
digest fed with various piece of random information: the current time,
the process id, the parent process id, the contents of an input file
(if -f is specified), and several bytes of information from the first
of the following devices which is present: /dev/random, /dev/urandom,
files in /proc, /dev/audio.

BUGS
The entropy in the generated 128-bit is probably quite small (and,
therefore, vulnerable to attack) unless a non-pseudorandom number gen-
erator is used (e.g., /dev/random under Linux).

It is assumed that none of the devices opened will block.

FILES
/dev/random
/dev/urandom
/dev/audio
/proc/stat
/proc/loadavg

SEE ALSO
X(1), xauth(1), md5sum(1)

AVAILABILITY
The mcookie command is part of the util-linux-ng package and is avail-
able from ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/.



_________________
Currently: Frugalware, Fedora
Previously: Gentoo, Startcom, Debian, Sabayon, Mint, openSUSE, Mangaka Chu, #!CrunchBang
Back to top
View user's profile Send private message
Lord.DragonFly.of.Dawn
Advanced Member


Joined: 18 Jul 2024
Posts: 607
Location: South Portland, Maine, USA, Earth, Sol System

PostPosted: Tue Dec 01, 2024 4:33 am    Post subject: Reply with quote

not everyday no... but i have used it before.

twas for a video remastering project i did. forget what exactly i needed it for.



_________________
ArchLinux x86_64 - Custom Built Desktop
ArchLinux x86_64 - Compaq CQ50 Laptop
ArchLinux i686 - Acer Aspire One Netbook
ArchLinux i686 - Dell Presario ze2000 (w/ shattered LCD)

PuppyLinux, CloneZilla, PartedMagic, DBAN - rescue thumbdrives
Windows 7 (x86_64 desktop alternate boot)
Back to top
View user's profile Send private message Visit poster's website
exiled
Jr. Member


Joined: 24 Nov 2024
Posts: 51
Location: ~/

PostPosted: Wed Dec 02, 2024 11:26 pm    Post subject: Reply with quote

I thought the mcookie might be useful,
I've needed random (or pseudo random) numbers many times in the past.


Now here is a super simple command, which may not be too obscure.
I wonder if this command is where Arch Linux gets it's name???

arch

NAME
arch - print machine hardware name (same as uname -m)

SYNOPSIS
arch [OPTION]...

DESCRIPTION
Print machine architecture.

--help display this help and exit

--version
output version information and exit

AUTHOR
Written by David MacKenzie and Karel Zak.



_________________
Currently: Frugalware, Fedora
Previously: Gentoo, Startcom, Debian, Sabayon, Mint, openSUSE, Mangaka Chu, #!CrunchBang
Back to top
View user's profile Send private message
Lord.DragonFly.of.Dawn
Advanced Member


Joined: 18 Jul 2024
Posts: 607
Location: South Portland, Maine, USA, Earth, Sol System

PostPosted: Thu Dec 03, 2024 4:40 am    Post subject: Reply with quote

webbot

did you know you have a spider installed in your system already?



_________________
ArchLinux x86_64 - Custom Built Desktop
ArchLinux x86_64 - Compaq CQ50 Laptop
ArchLinux i686 - Acer Aspire One Netbook
ArchLinux i686 - Dell Presario ze2000 (w/ shattered LCD)

PuppyLinux, CloneZilla, PartedMagic, DBAN - rescue thumbdrives
Windows 7 (x86_64 desktop alternate boot)
Back to top
View user's profile Send private message Visit poster's website
exiled
Jr. Member


Joined: 24 Nov 2024
Posts: 51
Location: ~/

PostPosted: Fri Dec 04, 2024 9:56 pm    Post subject: Reply with quote

no I didn't know of that one.

This one can be useful at times,
maybe not obscure, but definitely unique Very Happy

uniq

NAME
uniq - report or omit repeated lines

SYNOPSIS
uniq [OPTION]... [INPUT [OUTPUT]]

DESCRIPTION
Filter adjacent matching lines from INPUT (or standard input), writing
to OUTPUT (or standard output).

With no options, matching lines are merged to the first occurrence.

Mandatory arguments to long options are mandatory for short options
too.

-c, --count
prefix lines by the number of occurrences

-d, --repeated
only print duplicate lines

-D, --all-repeated[=delimit-method]
print all duplicate lines
delimit-method={none(default),prepend,separate} Delimiting is
done with blank lines.

-f, --skip-fields=N
avoid comparing the first N fields

-i, --ignore-case
ignore differences in case when comparing

-s, --skip-chars=N
avoid comparing the first N characters

-u, --unique
only print unique lines

-z, --zero-terminated
end lines with 0 byte, not newline

-w, --check-chars=N
compare no more than N characters in lines

--help display this help and exit

--version
output version information and exit

A field is a run of blanks (usually spaces and/or TABs), then non-blank
characters. Fields are skipped before chars.

Note: 'uniq' does not detect repeated lines unless they are adjacent.
You may want to sort the input first, or use `sort -u' without `uniq'.
Also, comparisons honor the rules specified by `LC_COLLATE'.

AUTHOR
Written by Richard M. Stallman and David MacKenzie.



_________________
Currently: Frugalware, Fedora
Previously: Gentoo, Startcom, Debian, Sabayon, Mint, openSUSE, Mangaka Chu, #!CrunchBang
Back to top
View user's profile Send private message
Lord.DragonFly.of.Dawn
Advanced Member


Joined: 18 Jul 2024
Posts: 607
Location: South Portland, Maine, USA, Earth, Sol System

PostPosted: Fri Dec 04, 2024 10:59 pm    Post subject: Reply with quote

since i almost always want to sort too when i need unique things `sort -u` does it for me.

-edit-

which is mentioned in the manpage of uniq.... interesting.



_________________
ArchLinux x86_64 - Custom Built Desktop
ArchLinux x86_64 - Compaq CQ50 Laptop
ArchLinux i686 - Acer Aspire One Netbook
ArchLinux i686 - Dell Presario ze2000 (w/ shattered LCD)

PuppyLinux, CloneZilla, PartedMagic, DBAN - rescue thumbdrives
Windows 7 (x86_64 desktop alternate boot)
Back to top
View user's profile Send private message Visit poster's website
exiled
Jr. Member


Joined: 24 Nov 2024
Posts: 51
Location: ~/

PostPosted: Sun Dec 06, 2024 1:24 am    Post subject: Reply with quote

still going...

How about pamoil, yes a linux oil painting Smile

pamoil

NAME
pamoil - turn a PAM image into an oil painting

SYNOPSIS
pamoil [-n N] [pamfile]

DESCRIPTION
Reads a Netpbm image as input. Does an "oil transfer", and writes the
same type of Netpbm image as output.

The oil transfer is described in "Beyond Photography" by Holzmann,
chapter 4, photo 7. It's a sort of localized smearing.

The smearing works like this: First, assume a grayscale image. For
each pixel in the image, pamoil looks at a square neighborhood around
it. pamoil determines what is the most common pixel intensity in the
neighborhood, and puts a pixel of that intensity into the output in the
same position as the input pixel.

For color images, or any arbitrary multi-channel image, pamoil computes
each channel (e.g. red, green, and blue) separately the same way as the
grayscale case above.

At the edges of the image, where the regular neighborhood would run off
the edge of the image, pamoil uses a clipped neighborhood.

OPTIONS
-n size
This is the size of the neighborhood used in the smearing. The
neighborhood is this many pixels in all four directions.

The default is 3.

SEE ALSO
pgmbentley(1), ppmrelief(1), ppm(5)



_________________
Currently: Frugalware, Fedora
Previously: Gentoo, Startcom, Debian, Sabayon, Mint, openSUSE, Mangaka Chu, #!CrunchBang
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    USA Linux Users Group Forum Index » Command Line Commands All times are GMT
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All content © 2024-2009 - Usa Linux Users Group
This forum is powered by phpBB. © 2024-2009 phpBB Group
Theme created by phpBBStyles.com and modified by Crouse