*MAFIA* Forums

*MAFIA* Forums

  • April 29, 2024, 02:18:24 AM
  • Welcome, Guest
Please login or register.

Login with username, password and session length
Advanced search  

News:

Welcome back the Arcade! Play over 100+ games to get the high score and compete against other forum members.

http://www.mafiaowns.com/index.php?action=arcade;sa=list;sortby=a2z;

Author Topic: Pointers and Tips  (Read 1565 times)

Rahl

  • Forum Member
  • Reputation: 279
  • Offline Offline
  • Posts: 379
    • View Profile
Pointers and Tips
« on: September 04, 2005, 05:16:03 PM »

Linux is unlike any operating system you've ever seen.  For once, you have an operating system that trusts you, believes in you, lives and dies with you, and has ABSOLUTELY NO RESERVATIONS about you fucking yourself over.  With that said, I thought I might just share a few thoughts about how to handle things.

1)  Never do anything you can't undo.  Now, I know that sounds painfully obvious, but seriously, mind it!  If you delete something in Linux, it is gone.  Completely.  No ifs, ands, or buts about it.  Linux handles memory allocations much differently from Windows.

2)  Be careful how you craft commands.  For the Linux newbie out there, you probably don't know what I'm getting at.  As you may or may not know, the real power behind Linux lies on the command line.  You have to issue commands like ps ax | grep vsftpd or ls -laR | uniq | wc -l.  Since Linux truly believes in the deepest realms of it's being that you are a cognizant, thinking individual, it will do whatever you ask to the best of its ability.  So be careful you don't do something dumb.  

Example from real life.  I made a web site that interfaced php, mySQL, and perl.  Just doing it for kicks this summer.  The webpages were in /srv/www/htdos/ which is where I was working on them, logged in as root (all-powerful superuser).  Like a good little boy, I had made backups of my work in $HOME/public_html/.  I got everything working like I wanted, and figured I would delete the backups and recreate them (I had a lot of redundant shit in the backup folder that I didn't want to have to take out piece by piece).  So, I issued the following command:
rm -R $HOME/public_html/ *  And there in lies my problem.  

You see, * is a metamatching character which tells the rm (or remove) command to grab everything it can.  The -R flag speaks to recursive deleting (subfolders).  My problem was the space between the * and the last /.  The -R part took care of delete the public_html folder like I wanted, but since the * was preceded by a space, it matched every file in the directory I was sitting in (the one with the originals).  In one fatal swoop, I was able to remove every page I'd fucking spent a month making.  So BE CAREFUL.

3)  Learn a command line editor.  Kwrite and Emacs are great when you have a GUI, but you won't always have that to fall back on.  Besides, this isn't Windows.  I know Toby likes vi, and that is bundled with damn near every distro you could get, so it's not a bad idea to get it.  Personally, I like ed.  Whichever you choose, be patient.  You'll be removing yourself from the realm of normal editing to the world of line editors, meaning you only work on one line at a time.  You'll quickly see the difference.

4)  Learn to read documentation.  If you don't know what a command does, and you can't understand what the doc says, you're fucked.  There's always forums and other sources you can go to for help, but it's wise to learn to find these things out for yourself.  You'll develop a deeper understanding and a greater appreciation for the knowledge you gain.  A good place to start is the manual pages which are bundled with the OS.  Simply type "man command" without the quotes to view the system doc for whatever command you are curious about.

For a deeper understanding of how the man pages work, just type in man man.  Self-referencing documentation?  How cool is that.

5)  Enjoy it.  Your time with Linux is going to be a huge learning experience -- might as well make the best of it.  You're joining a community of people who foster knowledge sharing.  Learn from others, so that one day you might be able to pass your wisdom on to someone else.  There's a plethora of informational sources out there for Linux, plus this section of the forums.  Don't worry about ridicule for something you think might be trivial.  Everyone had to learn at some time.  *GROUP HUG*

Anything you'd like to add Toby?
Logged

Toblerone

  • Forum Member
  • Reputation: 694
  • Offline Offline
  • Posts: 722
    • View Profile
Pointers and Tips
« Reply #1 on: September 04, 2005, 08:43:44 PM »

I like it very much....I would add one thing that is CRUCIAL when using linux...BE PATIENT!!!

Your patience and persistance WILL pay off. And you will end up feeling like your a fucking genious for figuring out how to set up a new software package from source...etc.

And of course...USE GOOGLE!!! For guides, docs etc..
Linux has an unbelievable community of users and developers who have information posted all over the fucking place. And dont be afraid to ask in a forum like this or some others. They wont think your n00bie. They were where you were at one time. Make sure to express your genuine interest in learning Linux, and you will make friends in the linux community very fast.
Logged

Gear

  • Forum Member
  • Reputation: 163
  • Offline Offline
  • Posts: 212
    • View Profile
    • tagged
Pointers and Tips
« Reply #2 on: September 04, 2005, 09:23:44 PM »

lol i like to read but not that much rahl.
Logged

Rahl

  • Forum Member
  • Reputation: 279
  • Offline Offline
  • Posts: 379
    • View Profile
Pointers and Tips
« Reply #3 on: September 04, 2005, 09:39:21 PM »

Well, I don't expect everybody to spend their time reading these threads.  Only those that are planning on using Linux.  Everyone else has my blessings to simply skip over these types of posts.  However, for those of you planning on using Linux, get used to reading.  It's going to become an unavoidable fact of life for you.
« Last Edit: February 03, 2006, 07:27:13 PM by Missa »
Logged

Swifty

  • Forum Member
  • Reputation: 295
  • Offline Offline
  • Posts: 684
    • View Profile
Pointers and Tips
« Reply #4 on: September 05, 2005, 01:00:45 PM »

I love you rahll keep up the good work!
Logged

*MAFIA* ßlåkjáx

  • *MAFIA* Admin
  • Forum Member
  • Reputation: 1472
  • Offline Offline
  • Posts: 3,936
    • View Profile
Pointers and Tips
« Reply #5 on: September 06, 2005, 07:00:10 PM »

Quote from: *MAFIA* Swifty
I love you rahll keep up the good work!

good god my eyes hurt
Logged
 

Page created in 0.042 seconds with 31 queries.