Linux.com

Community Blogs



How a poor boy of an in development country know Linux!

How a poor boy of an in development country know Linux?

All starts with a  simple fail, i need to use a computer, but it doesnot have Hard disk. Flash Drives was so expensive for me, so i rebember of an old conversation with one of my friends:

"I discovered that exist an Operational Sistem where there is no need for Hard Disk, it is Kurumin", it was Kurumin Linux.

So  i gone to my friends house and get one of this old Kurumin CDs, and run it by Live CD. WOW what was that? Runing just on RAM, on a old computer, it was faster than <the other> OS. Time passed and I got money enough to buy a HD, so I decided to install Kurumin in Dual Boot with <the other> OS.

After this i become sad because of some comments about the discontinuity of the Kurumin project. I quit Linux by a month when other friend tell me about Debian, so i downloaded it (yes on this time i become a University Student and get Internet), and instaled it.

WOW again ! another world, another Level!

I started with Debian etch, in January this Year, so i was tenpted to try Debian Lenny. Yes, i gone! Some time past and i get a faster computer and continued using Debian Lenny, now with 1GB RAM! Testing is Great!

Time passed and Lenny Become Stable! Wow it was fantastic! But i could not wait 2 days before going to Squeeze, where i am Now.

The live with Gnu/Linux  is SO EXCITING!, last week i tried to compile a new Linux Kernel. It fails, but this week i will try harder!

 Thank you Linux and GNU developers, you make me become a free man! Now i can use a computer, and change what i want on my PC! Thank you i can use a computer now!

 Ty

 

 

Using Perl to securely execute a command on and copy a file from a server.

This blog will discuss how to both securely execute a command on a remote server and securely copy a file from that server.

Here is the Perl script that can securely execute commands on as well as securely copy files from a server.

 #!/usr/bin/perl -w
##################################################
#This script is responsible for making a secure  #
#connection via ssh to server1 and executing the #
#commaned ls .                                   #
#This script is also responsible for making a    #
#a secure connection via ssh to server1 and then #
#scp the file test.txt.                          #
##################################################

#import required modules
use strict;
use Net::SCP qw(scp iscp);
use Net::SSH qw(ssh);
use Log::Dispatch::Syslog;

#declare local variables
my $scp;
my $host = "server1.domain.com";
my $user = "user1";
my $remotedir = "/home/user1/";
my $file = "test.txt";
my $cmd = "/bin/ls";

####################Log::Dispatch::Syslog#######################################
# Define our pid for use in the log message
my $pid = getppid();
# Define our logfile object
my $logfile = Log::Dispatch::Syslog->new( name => 'logfile',
                                          min_level => 'info',
                                          ident => "running_list_cmd[$pid]" );
####################Log::Dispatch::Syslog#######################################

######first connect to $host via Net::SSH and run /bin/ls###########
$logfile->log( level => 'info', message => "Connecting to $host as $user and running /bin/ls ..." );
ssh("$user\@$host", $cmd);
$logfile->log( level => 'info', message => "ls completed successfully!" );
######first connect to $host via Net::SSH and copy file $file###########

#initialize Net::SCP object and send credentials
$scp = Net::SCP->new($host);

#notify user we're logging into $host
print "Logging into $host ...\n";

#write "connected to $host" to $file
$logfile->log( level => 'info', message => "Connected to $host successfully." );

#log into $host as $user
$scp->login($user) or die $scp->{errstr};

#write "connected to $host" to $file
$logfile->log( level => 'info', message => "Logged into $host successfully." );

#notify user of changing working directory to $remotedir
print "Chaging working directory to $remotedir\n";

#change working directory to $remotedir
$scp->cwd($remotedir) or die $scp->{errstr};

#Write Changed working directory (CWD) to $remotedir
$logfile->log( level => 'info', message => "CWD to $remotedir successfully." );

#display file size of $file
$scp->size($file) or die $scp->{errstr};

#notify user scp of $file has started
print "SCPing $remotedir$file from $host ...\n";

#scp $file from $host
$scp->get($file) or die $scp->{errstr};

#notify user scp of $file from $host was successful
print "$remotedir$file copied from $host successfully!\n";

Disclaimer:  This blog entry comes with NO expressed warranty, guarantee, support, or maintenance of any kind!  Use at your own risk!   

Good luck and hope you find this useful.

 

Nice console regex helper

Last week I stumbled on a nice console regex helper. It’s not that I’m bad at regex but switching between sed, vim, python, perl regex trips me up a bit sometimes.

Full Post

 

Good for the (open) soul

Wow, Linux.com has really been buzzing with activity today.. Good to see the community active, and striving towards better things. Good to see the community being listened to, as well. Good to see the community not abusing being listened to, too ;P

 Forums could be a bit busier though, but they should catch on.. But no, lets not spoil the post with negativity, it's a good day, on a good site, using a good OS :D

 

Como solucionar problemas con las llaves de los repositorios de Launchpad

 Launchpad

Alguna vez te ha pasado que al actualizar "sudo apt-get update" tienes problemas con tus repositorios y te piden que vuelvas a actualizar o te indican que alguna llave esta mal?

Gracias a un script creado por por un usuario de Ubuntu Forums podremos olvidarnos de los problemas con los repositorios de Launchpad y los cambios de llaves.

1.- Para utilizarlo primero tienes que descargar el siguiente archivo - script
2.- Despues abre una terminal y navega hasta el script
3.- Teclea el siguiente comando en la terminal:

./launchpad-update

4.- Espera a que termine "Se paciente"

Listo eso es todo tendrás solucionados todos los problemas que tengas con las llaves de tus repositorios de Launchpad saludos!!!

 

Brian Masinick on desktop Linux systems

I have been a follower of free software since the eighties.  I started using commercial UNIX software in 1982, and not long after, I sought to find free utilities that would meet needs not cleanly met with standard tools.

When the GNU project started, I found a number of utilities that I liked, so over time, I used many of them.

I did not actually download my first Linux distribution until late 1995, when I finally purchased my first home PC for that very purpose.  By then, I was using the majority of tools that I was interested in that were in the Slackware Linux distribution.  I bought a book that Patrick Volkerding co-authored because I did not yet have broadband network access from home.  (It was not until 1999 that I got home broadband, and that is when my home Linux usage REALLY took off).

From 1999 until 2001 I was attending online graduate classes at the University of Phoenix.  I wrote about and promoted Linux at every opportunity, and at that time, I felt that emerging embedded systems and small form factor systems, coupled with free falling hardware prices would create a huge market for Linux systems across servers, desktops, and small devices.  There has been a nice market established, but nowhere near the size that I had been expecting, though a decade later, there are signs that good things are happening at a modest pace.

I enjoy testing and reviewing desktop Linux systems and I particularly enjoy desktop distributions that have been derived from Debian roots.

 

 

Linux.com is a model of the community

Today is a very good day for Linux, particularly because we have Linux.com working again.  I say this not exclusively because it was defacto offline for the last forever:  the old one was ugly.  Don't get me wrong, I loved the articles.  However, if I wanted to send a friend to Linux online I would send them to ubuntu.com, not linux.com.  That's not the case anymore.

 It's not just that Linux.com looks amazing, though it does.  It's the whole idea of a social community.  Users of Mac and Windows live in a vertical environment:  they send money up and down comes the software.  We live in a horizontal environment:  You have something I want so I take it and modify it and pass the modifications back to you.  Project x needs to implement feature y?  No problem, Project Z has that code and is glad to let you have it.  I think that it's really telling how Linux.com is a social networking site, unlike the sites for Mac and Windows.  The Guru Points idea is a great one, an idea that embodies Linux's meritocracy, and I can see this easily becoming the go-to place for answers in the future of Linux.  We now have a central point where all users of Linux - regardless of distro - can come together and enjoy the commonality that we have gained by using ethically sound software.

Great job Linux Foundation.  Keep up the good work.

 

ubuntu 9.04

i really like the newest version of ubuntu 9.04 other people reporting problems with it but no problems here
 

The ball is roling - kinda...

So I'm busy with exams and don't really have the time to post anything technical yet. I do however felt that the two groups I started need to get some kind of momentum - so I posted one question I'm interested in on each group.

Check it out:

I hope to actually contribute something more technical from my side within the next week :-)
 

Difference between USB and IEEE 1394?

Let me start this off with the disclaimer that this was an apples to oranges comparison (or in this case an Apple to Dell comparison). The reason I thought this was interesting is that there was far more variation than I expected, on the MacBook anyway.

 The machines have similar processors (Intel Core Duo), with the MacBook having a slight edge, 2.0 GHz as opposed to the Dells 1.8 GHz.  However, the Dell has 3 GB of ram as opposed to the Macbooks 1 GB.

 Anyway, I have been trying to get the project I have been working on (http://sourceforge.net/projects/objectify) to run on my wife's MacBook with Mac OS X. I have done all of the development on GNU/Linux and it runs very well on all of the versions of GNU/Linux I have tried. I have been using these Western Digital 1 TB external hard drives for storage.  They have both USB and Firewire connections and I have used both on Linux and never noticed any difference (but I had never tested to see if there was any real difference).

A few nights ago I got it compiled and working on the MacBook, but when I tried to store files with the MacBook it was painfully slow.  It was so slow that it was unusable for what I was trying to do.  So this morning I decided to run a test to see if I could figure out what was happening.  I connected the WD drive with the USB cable to the MacBook, prep'd it and stored 111 photos (384 MB).  These are the times:

    real    17m3.569s
    user    2m17.587s
    sys     0m31.001s

Then I wondered if the problem was the USB connection so disconnected the drive and reconnected it with the Firewire cable and imported exactly the same 111 files.  It was 4X faster than it was with the USB connection:

    real    4m10.148s
    user    2m1.636s
    sys     0m28.276s

I thought this was pretty weird because I had never noticed that much difference between USB and Firewire when running on GNU/Linux.   So then I had to run the same test again to see.  I ran the USB test first, with the same 111 files:

    real    1m57.584s
    user    1m31.102s
    sys    0m6.368s

And with Firewire:

    real    1m58.318s
    user    1m32.070s
    sys    0m6.996s

I thought it was interesting that there was such a significant difference between Firewire and USB on the MacBook, but not on the Dell.  I have decided I will have to get a Mac and install Linux on it and then compare Apples to Apples, so to speak.

 

 

Intro

Hi everybody at linux.com. Looking forward to get to know you.
 
Page 123 of 132

Upcoming Linux Foundation Courses

  1. LFS230 Linux Network Management
    06 Oct » 09 Oct - Virtual
    Details
  2. LFS416 Linux Security
    06 Oct » 09 Oct - Washington
    Details
  3. LFD331 Developing Linux Device Drivers
    13 Oct » 17 Oct - Virtual
    Details

View All Upcoming Courses


Who we are ?

The Linux Foundation is a non-profit consortium dedicated to the growth of Linux.

More About the foundation...

Frequent Questions

Join / Linux Training / Board