Shouldn't be this difficult. upload file

20 views
Skip to first unread message

jerry...@gmail.com

unread,
Jul 8, 2019, 7:58:00 PM7/8/19
to BeagleBoard

Connected to BBB using tty  specifically putty

logged and ls -a give me directory infor.

Trying to upload a file "test.txt" to the BBB from my local computer

Tried all these. nothing works.  What stupid mistake am I making?

Putty is running in the directory that "test.txt" resides.
the directory testing exists in the root on the BBB.  I see it with ls -a
I can cd to it and find no files in it. As it should be.

I try unsuccessfully to upload a file to it.  What am I doing wrong?

root@beaglebone:~/testing# cp test.txt test.txt

cp: cannot stat 'test.txt': No such file or directory


root@beaglebone:~/testing# cp C:\Users\Administrator\Desktop\test.txt /root/testing/test.txt

-bash: AdministratorDesktoptest.txt: command not found
cp: missing destination file operand after 'C:Users'
Try 'cp --help' for more information.


root@beaglebone:~/testing# cp 192.168.13.104:\Users\Administrator\Desktop\test.txt /root/testing/test.txt

cp: cannot stat '192.168.13.104:UsersAdministratorDesktoptest.txt': No such file or directory

Mike

unread,
Jul 8, 2019, 9:25:21 PM7/8/19
to beagl...@googlegroups.com
Putty connected via a serial connection (aka a tty) doesn't copy files from one machine to another.  Look into something like scp, sftp, winscp, etc. etc. etc.  Those all connect via IP though not serial.

Mike
--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/cbb636e5-22e5-47b5-bb9d-bb126a2da0d3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


gra...@flex-radio.com

unread,
Jul 8, 2019, 10:46:58 PM7/8/19
to BeagleBoard
jerry:

If your main computer is Linux, then you can cp across computers with a common network connection,

But if your main computer is Windows, for small to medium amounts of data ...
I find an easy way is to cd to where you want to create the file.
then 
nano test.txt
then copy the contents of the source file in a windows text editor into the copy buffer
then paste it into nano inside of putty.
Control-X to exit, Yes to save

In the reverse direction, cat the text file you want to export, copy in putty and paste into a suitable file inside of windows.

For larger amounts of data/files, you could put on a uSD card with a FAT file system and mount it in either a Windows computer or a Linux, moving the uSD card back and forth.
Or put the files/data on a USB stick formatted with FAT file system, then move the USB stick back and forth.

--- Graham

==

Dennis Lee Bieber

unread,
Jul 9, 2019, 2:16:19 PM7/9/19
to beagl...@googlegroups.com
On Mon, 8 Jul 2019 08:23:00 -0700 (PDT),
jerry...@gmail.com declaimed the
following:

>
>root@beaglebone:~/testing# cp test.txt test.txt
>
>cp: cannot stat 'test.txt': No such file or directory
>

When you connect with PuTTY, you are now "on" the beagle, and all
commands only know about the beagle file system.

If you have a file on the host computer, you either have to make the
host computer a mounted file system on the beagle (probably more complex
than you want to consider) OR use a file transfer program

If you are using PuTTY, you should also have it's SFTP client available
(I'm going to demonstrate with an R-Pi as I have it booted -- it's running
a web server, but other than the login and node names, both are versions of
Debian).

From PuTTY:
-=-=-=-
Using username "md_admin".
md_admin@microdiversity's password:
Linux microdiversity 4.19.42-v7+ #1219 SMP Tue May 14 21:20:58 BST 2019
armv7l

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Tue Jul 9 14:03:33 2019 from 192.168.1.66
md_admin@microdiversity:~$ ls
backup.sh microdiversity.tar.gz scratch
md_admin@microdiversity:~$ cd scratch
md_admin@microdiversity:~/scratch$ ls
md_admin@microdiversity:~/scratch$
-=-=-=-
Now start PSFTP and...
-=-=-=-
psftp: no hostname specified; use "open host.name" to connect
psftp> open microdiversity
Using username "md_admin".
md_admin@microdiversity's password:
Remote working directory is /home/md_admin
psftp> cd scratch
Remote directory is now /home/md_admin/scratch
psftp> ls
Listing directory /home/md_admin/scratch
drwxr-xr-x 2 md_admin md_admin 4096 Jun 14 15:25 .
drwxr-xr-x 3 md_admin md_admin 32768 Jul 9 14:03 ..
psftp> lcd c:\users\wulfraed
New local directory is c:\users\wulfraed
psftp> !dir
Volume in drive C is OS
Volume Serial Number is 4ACC-3CB4

Directory of c:\users\wulfraed

07/09/2019 02:10 PM <DIR> .
07/09/2019 02:10 PM <DIR> ..
12/03/2016 06:22 PM <DIR> .config
<SNIP>
07/08/2019 12:06 PM 457 default-loc.xml
07/08/2019 12:02 PM 238 default.gpr
07/08/2019 11:56 AM 136 demo.c
07/08/2019 11:59 AM 1,366,691 demo.exe
12/07/2016 09:57 PM 265 demo.rx
06/15/2019 12:11 PM <DIR> Desktop
<SNIP>
52 File(s) 293,487,396 bytes
57 Dir(s) 1,359,615,631,360 bytes free
psftp> put demo.c
local:demo.c => remote:/home/md_admin/scratch/demo.c
psftp> ls
Listing directory /home/md_admin/scratch
drwxr-xr-x 2 md_admin md_admin 4096 Jul 9 14:10 .
drwxr-xr-x 3 md_admin md_admin 32768 Jul 9 14:03 ..
-rw-r--r-- 1 md_admin md_admin 136 Jul 9 14:10 demo.c
psftp>
>
-=-=-=-
Back to PuTTY session
-=-=-=-
md_admin@microdiversity:~/scratch$ ls
demo.c
md_admin@microdiversity:~/scratch$ gcc demo.c -o demo
md_admin@microdiversity:~/scratch$ ./demo


Attempting to use GCC in GNAT arm-elf toolset on Windows

md_admin@microdiversity:~/scratch$
-=-=-=-

Obviously that was NOT built using Windows GNAT cross-tool.


--
Wulfraed Dennis Lee Bieber AF6VN
wlf...@ix.netcom.com http://wlfraed.microdiversity.freeddns.org/

Reply all
Reply to author
Forward
0 new messages