[olug] Lessons Learned: Using Linux BBC

Brian Wiese bwiese at cotse.com
Mon Dec 29 19:40:12 UTC 2003


On Sun, 28 Dec 2003 09:38:25 -0800 (PST)
CM Miller <cmmiller1973 at yahoo.com> wrote:

|A thing that I noticed is that it looks like you have
|to be very familiar with command lines to get what you
|needed done. 

note: theres quite a few mini knoppix-based distros out there for
instances just like this, for instance Damn Small Linux (DSL)
http://damnsmalllinux.org, that may require less resources of a machine
and have other benefits.  Feel free to try out other 'knoppix'
alternatives, and maybe lightweight morphix.

|Tried to use scp, sftp, and nc to move data to a
|machine that I had a ssh connection to.  It has been
|awhile since I've used these commands so this was a
|challenge and was not able to pull it off.  If anyone
|could post examples of the above mentioned, please do.

Brandon already mentioned scp, but I'll throw in 2 lines

scp sourcefile user at desthost:/home/user/backup.file (send a file)
scp user at srchost:/home/user/backup.file destfile    (recv a file)

sftp - don't know much about this, but I assume it's like regular ftp
commands. gftp is a nice gui ftp program for gnu/linux systems.  hsftp is
a command line ftp-like client that transports data over ssh.

netcat is good for... about anything I guess: files, archives, disk
drives.  It's really a 'back-end' tool, like a pipe to pass anything over
a network (usually 'pipe' stuff over to netcat), a straight tcp
connection, so you need a client and server, and nc does both.

I'll assume the client has the data and wants to send it to a listening
server (ip address 192.168.1.101), and the server will receive the file as
"recv.ext" where ext is the extension for the filetype you are sending. 
So, on the server side, setup netcat to listen on a high port above 1024,
which you can do w/o root powers, and redirect whatever it receives into
our file recv.ext.

$ nc -l -p 5555 > recv.ext

(send a sourcefile to the server, a couple ways at least)
$ cat sourcefile | nc 192.168.1.101 5555
$ dd if=sourcefile | nc 192.168.1.101 5555

(send a directory of stuff... tar and gzip a directory with of data to
stdout (that "-" always gets me), pipe through netcat and wait 2 secs to
close final connection)
$ tar cvfz - backupdir/ | nc 192.168.1.101 5555 -w 2

(send a disk image)
$ dd if=/dev/hda1 | nc 192.168.1.101 5555

Bulk File Transfers from Windows to ???
http://www.linuxgazette.com/issue68/tag/4.html

|Thought about using Samba, but has been more then a yr
|since I've set that up as well.  Also tried to used
|LinNeighborhood, since smbd was running on both
|machines, but neither machine did not see each other
|on the network. 

I'm a little rusty with samba too, and it sounds like a little more work,
perhaps more or less with nfs as well.  In both instances, it may take a
bit to setup the system and servers properly, but then it's just copying
from one directory to the next (mounted remote directory).  If you have a
samba share available on the network, you just need to mount it "I
believe??" as follows:

# mount -t smbfs //192.168.1.101/share /mnt/share -o
# rw,username=user,password=1234

for some nfs network drives I setup at home, in my client side /etc/fstab
I have something like (all one line):
192.168.1.101:/mnt/share  /mnt/backup nfs
user,noauto,rw,rsize=8192,wsize=8192,posix   0 0

then on the server in /etc/exports, something like:
/mnt/share *.lan(secure,rw,sync,anonuid=1000,anongid=1000)

with my /etc/hosts on the nfs server:
192.168.1.100 windozebox windoze.lan

I'm pretty new to nfs though, and it requires restarting the nfs server
(/etc/init.d/nfs-kernel restart), so don't trust anything I say about it.
=)

cheers, hth
-- 
Brian Wiese          "What we do in life, echoes in eternity."
bwiese(at)cotse.com  gpg: 0x2FD6AF16    keysvr: pgp.dtype.org
phone: 402.932.5490  aim: unolinuxguru  www.unomaha.edu/~bwiese
---------------------------------------------------------------- 
Please avoid sending me Word or PowerPoint attachments.
See http://www.fsf.org/philosophy/no-word-attachments.html


More information about the OLUG mailing list