Click to See Complete Forum and Search --> : How I finally learned how to use the command line-- I owe it all to porn!


blackbelt_jones
08-02-2004, 01:37 PM
Once, a long time ago, I got into a discussion about computers with my landlord, who told me that "Linux is a pain in the ***". I found it difficult to argue the point, at the time, but I know what I'd say now: Linux is a pain in the ***, until you learn how to use the command line.

I had tried tutorials and manuals, but I'm just not the kind of person who can READ his way into understanding this, It was PORN that got me learning the command line, for two important reasons.

1) I felt kind of guilty about all the time I spent on this sort of thing, and I resolved that if I was going to continue snagging pornpix from IRC chatrooms, I would make it productive by a) learning how to use the CLI to manage my files and b) pushing my exercise bike up to the computer desk. So the urge to not feel like such a pathetic wanking loser was a great motivator. (by the way, I've already lost six pounds!)

2) My god-given love of looking at naked women had resulted in lots and lots of small jpg files, and organizing lots and lots of files turns out to be a situation where a few simple commands can work wonders, much more efficiently than can ever be done with the old copy-and paste method. It's also a hell of a lot more interesting, because discovering shortcuts with the command line involves creative thought. In no time, my files were so neat and carefully organized, you'd think it was Martha Stewart's porn collection!

Of course, I'm not reccomending porn as an educational tool for the non-perv... I'm pointing to file-organizing as a great place to start learning how to use the CLI, and in a more general sense, how even the stupid things we like to do with our computer are a great opportunity for learning. For me, it happens to be porn. For you , it may be something nobler and more uplifting-- like stealing music from the internet. It's all good, if you use it properly.
:cool:

hard candy
08-02-2004, 01:42 PM
At last, the naked truth is revealed! :)

Dark Ninja
08-02-2004, 01:50 PM
At last, he has given up the bondage of the GUI! ;)

Icarus
08-02-2004, 02:21 PM
mmmkay...

Linux! Makes porn easy! :)

happybunny
08-02-2004, 03:02 PM
what else would you use a computer for?

Loki3
08-02-2004, 03:02 PM
Originally posted by Icarus
mmmkay...

Linux! Makes porn easy! :)

You could talk until you turn blue about freedom, open source, configuration, stabilty but this is what will woo the masses.

eriksays
08-02-2004, 03:44 PM
umm, it's what the internet was invented for.

ph34r
08-02-2004, 03:57 PM
If it makes you feel better, most of what I've learned about networking and TCP/IP has been the result of playing Quake, etc.

Porn has definately improved my shell scripting too.

blackbelt_jones
08-02-2004, 04:00 PM
It keeps getting better! In the couple of hours since I started this thread, I have discovered Wget, the command line download manager that allows me to simply copy a full page of links onto the command line all at once, and just sit back while that fabulous hirsute data comes rolling in!

And by the way, could anyone suggest a very simple image viewer that I can operate from the command line? There must be something that will allow me, while sorting jpgs, to simply use the filename as an arguement and see what I'm working with, without having to leave the command line.

Also, is there an application that opens zip files from the command line? What I found in my manual only applies to different kinds of archives.

happybunny
08-02-2004, 04:14 PM
doesn't tar work with zip files?

hard candy
08-02-2004, 04:22 PM
http://www.imagemagick.org/ towards the bottom is a Howto on using the command line options. Excellent program.



Man unzip ( I'm glad my coworkers didn't see me put that into the search bar!)

NAME
unzip - list, test and extract compressed files in a ZIP
archive

SYNOPSIS
unzip [-Z] [-cflptuvz[abjnoqsCLMVX$]] file[.zip]
[file(s) ...] [-x xfile(s) ...] [-d exdir]

DESCRIPTION
unzip will list, test, or extract files from a ZIP archive,
commonly found on MS-DOS systems. The default behavior
(with no options) is to extract into the current directory
(and subdirectories below it) all files from the specified
ZIP archive. A companion program, zip(1L), creates ZIP
archives; both programs are compatible with archives created
by PKWARE's PKZIP and PKUNZIP for MS-DOS, but in many cases
the program options or default behaviors differ.

ARGUMENTS
file[.zip]
Path of the ZIP archive(s). If the file specification
is a wildcard, each matching file is processed in an
order determined by the operating system (or file sys-
tem). Only the filename can be a wildcard; the path
itself cannot. Wildcard expressions are similar to
Unix egrep(1) (regular) expressions and may contain:

* matches a sequence of 0 or more characters

? matches exactly 1 character

[...]
matches any single character found inside the
brackets; ranges are specified by a beginning
character, a hyphen, and an ending character. If
an exclamation point or a caret (`!' or `^') fol-
lows the left bracket, then the range of charac-
ters within the brackets is complemented (that is,
anything except the characters inside the brackets
is considered a match).

(Be sure to quote any character that might otherwise be
interpreted or modified by the operating system, par-
ticularly under Unix and VMS.) If no matches are
found, the specification is assumed to be a literal
filename; and if that also fails, the suffix .zip is
appended. Note that self-extracting ZIP files are sup-
ported, as with any other ZIP archive; just specify the
.exe suffix (if any) explicitly.

[file(s)]
An optional list of archive members to be processed,
separated by spaces. (VMS versions compiled with
VMSCLI defined must delimit files with commas instead.
See -v in OPTIONS below.) Regular expressions (wild-
cards) may be used to match multiple members; see
above. Again, be sure to quote expressions that would
otherwise be expanded or modified by the operating sys-
tem.

[-x xfile(s)]
An optional list of archive members to be excluded from
processing. Since wildcard characters match directory
separators (`/'), this option may be used to exclude
any files that are in subdirectories. For example,
``unzip foo *.[ch] -x */*'' would extract all C source
files in the main directory, but none in any subdirec-
tories. Without the -x option, all C source files in
all directories within the zipfile would be extracted.

[-d exdir]
An optional directory to which to extract files. By
default, all files and subdirectories are recreated in
the current directory; the -d option allows extraction
in an arbitrary directory (always assuming one has per-
mission to write to the directory). This option need
not appear at the end of the command line; it is also
accepted before the zipfile specification (with the
normal options), immediately after the zipfile specifi-
cation, or between the file(s) and the -x option. The
option and directory may be concatenated without any
white space between them, but note that this may cause
normal shell behavior to be suppressed. In particular,
``-d ~'' (tilde) is expanded by Unix C shells into the
name of the user's home directory, but ``-d~'' is
treated as a literal subdirectory ``~'' of the current
directory.

OPTIONS
Note that, in order to support obsolescent hardware, unzip's
usage screen is limited to 22 or 23 lines and should there-
fore be considered only a reminder of the basic unzip syntax
rather than an exhaustive list of all possible flags. The
exhaustive list follows:

-Z zipinfo(1L) mode. If the first option on the command
line is -Z, the remaining options are taken to be
zipinfo(1L) options. See the appropriate manual page
for a description of these options.

-A [OS/2, Unix DLL] print extended help for the DLL's pro-
gramming interface (API).

-c extract files to stdout/screen (``CRT''). This option
is similar to the -p option except that the name of
each file is printed as it is extracted, the -a option
is allowed, and ASCII-EBCDIC conversion is automati-
cally performed if appropriate. This option is not
listed in the unzip usage screen.

-f freshen existing files, i.e., extract only those files
that already exist on disk and that are newer than the
disk copies. By default unzip queries before overwrit-
ing, but the -o option may be used to suppress the
queries. Note that under many operating systems, the
TZ (timezone) environment variable must be set
correctly in order for -f and -u to work properly
(under Unix the variable is usually set automatically).
The reasons for this are somewhat subtle but have to do
with the differences between DOS-format file times
(always local time) and Unix-format times (always in
GMT/UTC) and the necessity to compare the two. A typi-
cal TZ value is ``PST8PDT'' (US Pacific time with
automatic adjustment for Daylight Savings Time or
``summer time'').

-l list archive files (short format). The names,
uncompressed file sizes and modification dates and
times of the specified files are printed, along with
totals for all files specified. If UnZip was compiled
with OS2_EAS defined, the -l option also lists columns
for the sizes of stored OS/2 extended attributes (EAs)
and OS/2 access control lists (ACLs). In addition, the
zipfile comment and individual file comments (if any)
are displayed. If a file was archived from a single-
case file system (for example, the old MS-DOS FAT file
system) and the -L option was given, the filename is
converted to lowercase and is prefixed with a caret
(^).

-p extract files to pipe (stdout). Nothing but the file
data is sent to stdout, and the files are always
extracted in binary format, just as they are stored (no
conversions).

-t test archive files. This option extracts each speci-
fied file in memory and compares the CRC (cyclic redun-
dancy check, an enhanced checksum) of the expanded file
with the original file's stored CRC value.

-T [Unix only] set the timestamp on the archive(s) to that
of the newest file in each one. This corresponds to
zip's -go option except that it can be used on wildcard
zipfiles (e.g., ``unzip -T \*.zip'') and is much fas-
ter.

-u update existing files and create new ones if needed.
This option performs the same function as the -f
option, extracting (with query) files that are newer
than those with the same name on disk, and in addition
it extracts those files that do not already exist on
disk. See -f above for information on setting the
timezone properly.

-v be verbose or print diagnostic version info. This
option has evolved and now behaves as both an option
and a modifier. As an option it has two purposes:
when a zipfile is specified with no other options, -v
lists archive files verbosely, adding to the basic -l
info the compression method, compressed size, compres-
sion ratio and 32-bit CRC. When no zipfile is speci-
fied (that is, the complete command is simply ``unzip
-v''), a diagnostic screen is printed. In addition to
the normal header with release date and version, unzip
lists the home Info-ZIP ftp site and where to find a
list of other ftp and non-ftp sites; the target operat-
ing system for which it was compiled, as well as (pos-
sibly) the hardware on which it was compiled, the com-
piler and version used, and the compilation date; any
special compilation options that might affect the
program's operation (see also DECRYPTION below); and
any options stored in environment variables that might
do the same (see ENVIRONMENT OPTIONS below). As a
modifier it works in conjunction with other options
(e.g., -t) to produce more verbose or debugging output;
this is not yet fully implemented but will be in future
releases.

-z display only the archive comment.

MODIFIERS

blackbelt_jones
08-02-2004, 05:39 PM
In a stunning moment of grasping the obvious, I decided to try the command "unzip"

typed:
unzip anna.zip

Then I hit "return", and.... hello, anna! :)

JohnT
08-02-2004, 05:47 PM
And by the way, could anyone suggest a very simple image viewer that I can operate from the command line? There must be something that will allow me, while sorting jpgs, to simply use the filename as an arguement and see what I'm working with, without having to leave the command line. If you have the Gnome application "gthumb"man gthumb

sharth
08-02-2004, 06:09 PM
mplayer with ascii art!

madcompnerd
08-02-2004, 06:39 PM
feh

jailbreaker
08-02-2004, 09:27 PM
feh is cool :-D

I thinbk its funny that blackbelt_jones and I learned the same way lol

see porn is good it helps you learn :D

happybunny
08-02-2004, 09:34 PM
but what we haven't learned is how can we access this porn now that it is so neatly organized and unziped for us?

jailbreaker
08-02-2004, 09:57 PM
too bad there wasnt a script or something where you can tell it to take all current files in the current directory and make a new directory and number them all from 1 to whatever :D :D

^I think thats the alcohol talking but it appears likea good idea from a dunk :D :D :D

Dark Ninja
08-02-2004, 11:02 PM
Originally posted by blackbelt_jones
and see what I'm working with
Apparently not much...:rolleyes:

ZING!

nickptar
08-02-2004, 11:05 PM
Originally posted by blackbelt_jones

And by the way, could anyone suggest a very simple image viewer that I can operate from the command line? There must be something that will allow me, while sorting jpgs, to simply use the filename as an arguement and see what I'm working with, without having to leave the command line.

I greatly recommend xli.

JohnT
08-02-2004, 11:08 PM
Originally posted by jailbreaker
too bad there wasnt a script or something where you can tell it to take all current files in the current directory and make a new directory and number them all from 1 to whatever :D :D

^I think thats the alcohol talking but it appears likea good idea from a dunk :D :D :D
These are close:
mass rename v1.2
http://alfalinux.sourceforge.net/mrename.php3

Batren
http://batren.sourceforge.net/

Gprename
http://gprename.sourceforge.net/en/index.php

EnigmaOne
08-02-2004, 11:11 PM
Originally posted by blackbelt_jones
In a stunning moment of grasping the obvious, I decided to try the command "unzip"
Within the context of 'pron', doesn't this qualify as tmi?

Dark Ninja
08-02-2004, 11:27 PM
Originally posted by EnigmaOne
Within the context of 'pron', doesn't this qualify as tmi?
Enigma...that was the best!
ROTFLMAO

dboyer
08-02-2004, 11:31 PM
I always liked eog (Eye Of Gnome) for looking at images.

Icarus
08-02-2004, 11:36 PM
GQView (http://gqview.sourceforge.net/)

blackbelt_jones
08-02-2004, 11:57 PM
Originally posted by jailbreaker
feh is cool :-D

I thinbk its funny that blackbelt_jones and I learned the same way lol

IIf you've ever seen the guys at your average LUG meeting, you have to assume that it must be a pretty standard way to learn.

fatTrav
08-03-2004, 02:13 AM
ah yes, i remember the good old days of linux when I knew i finally had my system all configured and everything set up when i could watch some porn with xine. (hey, i remember when u had to install a media player as well as the damn plugins. wmv files were a pain to play back in march of 2002)

i once lived with a roommate who had a cron job do with movies what you, blackbelt_jones, want to do with pics. he never shared this script with anyone though...

IIf you've ever seen the guys at your average LUG meeting, you have to assume that it must be a pretty standard way to learn.

I remember a thread on this board awhile back about LUGs and broads, and comment was made along the lines of that. Maybe things have changed since I graduated with a CS degree only 3 months ago, but most broads were turned off by the response of "Computer Science" to the "what's your major" question because they think CS majors are geeks. Why they think that is beyond me...

blackbelt_jones
08-10-2004, 01:31 PM
Originally posted by JohnT
These are close:
mass rename v1.2
http://alfalinux.sourceforge.net/mrename.php3

Batren
http://batren.sourceforge.net/

Gprename
http://gprename.sourceforge.net/en/index.php

I Installed mass rename for just this sort of thing. (renaming with sequential numbering of files) It's a great, simple console program.

rocketpcguy
08-10-2004, 02:10 PM
gqview was designed for porn. just right click the left bottom file name selection and choose "thumbnails". taa daa!

you can also use the leech like extention for firefox to grab and download all the links from a website.

you can preview downloaded videos with wget, just open anthoer console and view the mid-downloading file with a mpg player

Sepero
02-15-2005, 02:40 PM
I just had to revive this thread. It's too much. :p

infiniphunk
02-15-2005, 06:38 PM
I think Firefox also had an extension called "down them all"; not sure if its still available or not. Basically just download all the jpegs from links on a page. You just gotta wonder who this one was designed for...

davisfactor
02-15-2005, 09:58 PM
There's also a viewer called pornview .. though it's a lot like gqview (which is the best IMO)

blackbelt_jones
02-15-2005, 10:06 PM
Oh NO! This infernel thread rises from the depths of hell! Who could be respnsible for this abomination? :confused:

Originally posted by Sepero
I just had to revive this thread. It's too much. :p

Ah but of course! We meet again, Mr. Sepero.

Originally posted by infiniphunk
I think Firefox also had an extension called "down them all"; not sure if its still available or not. Basically just download all the jpegs from links on a page. You just gotta wonder who this one was designed for...

Obviously, it was designed for the average computer user. I think I may have a new favorite browser!

cybertron
02-15-2005, 10:57 PM
Can we start calling Sepero the threadomancer?

http://students.luther.edu/~nemebe01/images/threadomancer.jpg

I hope that isn't a copyright violation or something. I just found the background through Google and Gimped in the words...:confused:

Sepero
02-16-2005, 08:30 AM
Nice cybertron. ;)

cybertron
02-16-2005, 12:12 PM
Thanks:)

Have I mentioned that I got more creative (which is still not saying much) because of the Gimp than any art class I ever took?:D

Stupid Boy
02-20-2005, 10:24 PM
I remember reading about a CPU usage monitor program that had a cartoon of a girl who stripped as CPU usage increased.

EDIT: I found the name: Hot Babe, but I could not find where it can be downloaded.

EDIT2: dindinx.net/hotbabe/ is the site.

cybertron
02-20-2005, 10:36 PM
Wait a minute, I'm quite certain this thread was closed:confused:

Something about gehidore killing Sepero's undead monstrosity;)

blackbelt_jones
02-20-2005, 11:16 PM
When there's no more room in Hell...
My threads will walk the earth!

gehidore
02-21-2005, 12:11 AM
Originally posted by cybertron
Wait a minute, I'm quite certain this thread was closed:confused:

Something about gehidore killing Sepero's undead monstrosity;)

It was.

That changed.

It might change again.

blackbelt_jones
02-21-2005, 02:39 AM
Excuse me? I'll have you know this is MY undead monstrosity. Sepero merely revived it.

Well, as personally damaging as it is to my good name in this forum (insert winky face here), I think this thread had a valid point, which is that the command line not only has practical applications in the silly things we do with our computers, but the silly things we do with our computers provide an excellent opportunity for learning the command line. Having made that point, I'm not sure a lot more can be added to that, so the thread kind of meanders on pointlessly.

But let me add this, for the benefit of anyone who is new: When you learn to use the command line to copy, move, delete, and sort files-- the real drudge work of system maintanance-- that is when Linux starts to make sense, when it starts to really be worth the effort of switching to Linux. It's really easy to learn, and saves a hell of a lot of work, so the sooner you pick it up, the better.

Here's a great example of how the CLI saves work. I decided that I wanted to split my jpg files into alphabetical directories, because there were so many of them And that whenever I opened the huge jpg directory with nautilus it would take about a minute to read the directory-- so here is how I created 26 alphabetical directories:

$mkdir a b c d e f g h i j k l m n o p q r s t u v w x y z

That single command created and named all 26 directories. Think how long it would take to create and name 26 directories with the gui!

and when I wanted to sort the files into the individual directories, all I had to do was type tyhe command

$mv a* /home/jones/jpg/a

and then repeat and edit the command thusly:

$mv b* /home/jones/jpg/b

and so on. It only took a few minutes. If you already know how to use the cli, this is pretty basic stuff, but you probably remember how excited you were when you first discovered it. I'll say it again: this is the moment when I turned a corner, and Linux started to really make sense.

It took me more than a year to learn the basic drudge gui commands that I now use everyday. Don't make that mistake if you can help it!

Sepero
02-21-2005, 08:01 AM
Originally posted by cybertron
Wait a minute, I'm quite certain this thread was closedI asked gehidore to please unlock it. He was kind enough to do so. Now everyone play nice!
:)

rocketpcguy
02-21-2005, 09:37 AM
play nice? someone already linked to a program that shows nude women! :)

Parcival
02-21-2005, 10:59 AM
All the world's a stage,
And all the men and women merely players.

- William Shakespeare

cybertron
02-21-2005, 11:53 AM
Originally posted by blackbelt_jones
Excuse me? I'll have you know this is MY undead monstrosity. Sepero merely revived it.

Well, one could argue that it was yours when it was alive but now that Sepero revived it it's his, but that's just semantics:)

Either way it's an undead monstrosity and I'd better stop posting OT stuff to it or gehidore is going to have to un-undead it again:D

Icarus
02-21-2005, 12:01 PM
Don't worry about gehidore, if this 'nothingness' keeps up the tread will be closed again

To me it looks like everything that needs to be said has been said and anything new can be opened as a new thread
And for that one link...let's just remove the hyperlink but keep the addy ;)

phil_r
06-29-2005, 03:22 PM
About 3 pages back :-) The question was asked about a good CLI image viewer... I use FBI, it's excellent.

My intro to file management in general was a strip poker game where I was able to rename the files so the girls started naked and got dressed as I won. That was way back on the Commodore Amiga....

Phil.

blackbelt_jones
06-29-2005, 04:31 PM
Oh well, I don't do the porn thing nearly as much as I used to back then, but the point I was trying to make back then is still valid. The stupid things that you do with your computer that waste time and make you feel guilty are great learning opportunities.

Lately I've been spending a lot of time posting on a particular forum where people argue about news and politics in the crudest, bawdiest terms possible. It would be a total waste of time if it hadn't taught me so much about HTML.

I may have said this before, but anything that generates large number of files is a great opportunity for learning bash as an interactive file manager. If you don't have thousands of pornpics, maybe you've got thousands of illegally downloaded mp3.

rocketpcguy
06-30-2005, 06:26 AM
blackbelt jones, learn how to start up a file server, so that we can share your 'goodies' ;)

Parcival
06-30-2005, 06:56 AM
Bad idea since the copyright applies for the goodies as well. ;) You are free to enact them within your own walls, however - unless someone puts a patent on them...
talking of patents, we have a big battle overhere in Europe again as the new law has to pass the parliament for the second time. Opponents to software patents try to limit them by making "natural forces" necessary for a patent request so one can't patent the software itself.

Hmm, giving it a second thought, the techinques in blackbelt's goodies could be patented even under a modified legislation since I see a considerable amount of natural forces there. :D

XiaoKJ
06-30-2005, 07:25 AM
$mv a* /home/jones/jpg/a


Is it possible to use a char variable to do the stringing? something along the lines of
$ for char in .... ;do mv $(char)* /home/jones/jpg/$(char) ; done

Sepero
07-01-2005, 10:05 AM
Is it possible to use a char variable to do the stringing? something along the lines of
$ for char in .... ;do mv $(char)* /home/jones/jpg/$(char) ; done

I haven't tested this code, but I believe it would go like this:for char in a b c d e f g h i j k l m n o p q r s t u v w x y z
do mv "$char"* /home/jones/jpg/"$char"
done

Although I'm sure it could be more compact by having a "for (( i=0; i < 26; i++))" and then converting the numbers to characters, but I don't know how. I'm sure there's a way it could be done. Bwkaz probably knows...