LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 10-31-2018, 11:52 AM   #1
L_Carver
Member
 
Registered: Sep 2016
Location: Webster MA USA
Posts: 243

Rep: Reputation: Disabled
Question Simplest question in the world (search hits missing in spades)


How in Ubuntu do you copy (or move) files from the rest of your system's hard drive/s to a shared folder on the same machine?

And to answer the question before it's asked, I have gone back to Google because DuckDuckGo is dog slow on my WiFi LAN (I prefer to blame my service carrier [Spectrum] rather than my machine).

I have used the word "LOCAL," a word I thought summarises 'same machine' in my search strings but I don't see any hits which look like they link to discussions of copying files on the same machine (a four-word string that is bound to confuse the Boolean routines on Any search engine, DDG included).

I remember seeing something close, which recommended using cUrl, wget, even FTP, but I don't think I should have to resort to those measures.

My intent is facilitate copying (or moving) APKs for my phone into the shared folder from where I can SMB or FTP them to the logical target {the phone}.

Once I know the ordinary path, I ought to be able to script something (I script in bash, for the uninitiated), shouldn't I?

Carver

Last edited by L_Carver; 10-31-2018 at 11:54 AM.
 
Old 10-31-2018, 12:22 PM   #2
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,882
Blog Entries: 13

Rep: Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930
How do you copy of move files in Linux from one place on the machine to another?

Either using the cp or mv commands from the command line.

Or using the File Manager and selecting files/folders, then cut/copy/paste.

Can you please describe why there seems to be a problem with this?
 
Old 10-31-2018, 12:59 PM   #3
teckk
LQ Guru
 
Registered: Oct 2004
Distribution: Arch
Posts: 5,137
Blog Entries: 6

Rep: Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826
Quote:
My intent is facilitate copying (or moving) APKs for my phone into the shared folder from where I can SMB or FTP them to the logical target {the phone}.
Is this an Android phone? Then mount it as a mtp device somewhere. Then you can copy to it/from it. With core tools or a file mgr. Phone needs to be set as mtp device.

Reference:
https://wiki.archlinux.org/index.php...nsfer_Protocol
Quote:
Once I know the ordinary path, I ought to be able to script something
Yes, you sure can.
 
Old 10-31-2018, 07:50 PM   #4
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,317
Blog Entries: 28

Rep: Reputation: 6140Reputation: 6140Reputation: 6140Reputation: 6140Reputation: 6140Reputation: 6140Reputation: 6140Reputation: 6140Reputation: 6140Reputation: 6140Reputation: 6140
Alternatively, you can install Airdroid from the Play Store. You do not need an Airdroid account to use it for local file transfers. I've been using Airdroid for several years and found it quite serviceable.

https://www.airdroid.com/
 
Old 11-01-2018, 05:50 AM   #5
L_Carver
Member
 
Registered: Sep 2016
Location: Webster MA USA
Posts: 243

Original Poster
Rep: Reputation: Disabled
@rtmistler: I still wouldn't know the destination of the cp or mv command, would I?
What's the path? What's the pattern to look for? I can copy or move from hard drive to attached USB volume, because I've known the basic pattern point a to point b for longer than even USB has been around, but no one has given me an answer to WHAT'S THE PATH?

@teckk: I want to skip physically (and in a literal sense, a USB cable is physical, is it not?) connecting my phone to my laptop. To use the WiFi LAN I already have in place. I did install an MTP utility, only to discover that it used MTP and Only MTP, at which point in time I UNinstalled it (I didn't even have it on my machine long enough to remember the name.)

@frankbell: I have used AirDroid since I first got this phone, and on one other phone, briefly, before this one. Frankly, I find it a hassle, too. I'm looking for "old school" means, like SSH and SMB which (before 2017, ymmv) were as easy to get instructions for as falling out of bed. Again, path please!

Did something happen in the two and a half years between my first Android phone and this one to make "old and reliable" such an anathema to people who used to know this stuff (myself included)? [It reminds me of bash 4.0 and wherever bash is now in update numbers: when did declaring an IFS suddenly become an obstacle and not a help?]

Carver

Last edited by L_Carver; 11-01-2018 at 06:07 AM.
 
Old 11-01-2018, 09:49 AM   #6
L_Carver
Member
 
Registered: Sep 2016
Location: Webster MA USA
Posts: 243

Original Poster
Rep: Reputation: Disabled
I think I figured out where I've gone wrong.

When I created a shared folder on my laptop, I did not use a file navigator. I created it in the .conf file (ssh.conf, more than likely) which, of course, is the wrong way to go about things. The right way would certainly give me a path, as I banged on and on about in my previous post; the minor issue of setting permissions to that would indeed be no issue at all to someone of my experience.

Always the smallest things baffle and confuse one, right?

So my new question is: is it preferable to make such a directory in /home/$USER/Public or simply /home/$USER? I've always been sketchy on that bit.

Carver
 
Old 11-01-2018, 09:52 AM   #7
teckk
LQ Guru
 
Registered: Oct 2004
Distribution: Arch
Posts: 5,137
Blog Entries: 6

Rep: Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826
Quote:
I still wouldn't know the destination of the cp or mv command, would I?
What's the path?
You are the one sitting at the machine. Use you own paths that you have mounted. How could anyone else know that?

Quote:
I'm looking for "old school" means, like SSH and SMB
You can have a ssh server running on the laptop and ssh into it from the phone, or vise versa

I think that I've seen smb for android in the app store.

One other option would be to have a web server running on the laptop, then open a browser on the phone and get what you want.

For example using python, with a laptop at 192.168.0.2, in the directory that you want to share
Code:
python2 -m SimpleHTTPServer 8100
Code:
python3 -m http.server 8100
Open the phones web browser to http://192.168.0.2:8100

Or from my notes:
Code:
ruby -run -e httpd . -p 8100
php -S localhost:8100 -t /var/lib/www
Or you can share a single file with
Code:
netcat -l -p 8100 -v < /path/index.html
Open the phones web browser to http://192.168.0.2:8100

Old school enough for you?

Sorry for all the edits

Last edited by teckk; 11-01-2018 at 09:54 AM.
 
Old 11-02-2018, 10:04 AM   #8
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
Quote:
Originally Posted by L_Carver View Post
. I'm looking for "old school" means, like SSH and SMB which (before 2017, ymmv) were as easy to get instructions for as falling out of bed.
Sftp. is dead simple.
Old school is pre-2017?
rsync hasn't changed in 20 years, dead simple.

I must be ancient.
 
Old 11-04-2018, 11:01 AM   #9
L_Carver
Member
 
Registered: Sep 2016
Location: Webster MA USA
Posts: 243

Original Poster
Rep: Reputation: Disabled
Please answer "I think I figured out where I've gone wrong."

I'm anticipating problems with any new shared folders I create.

Carver
 
1 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Browser UI, search file names, download hits? catkin Linux - Software 2 07-10-2012 04:19 PM
script to search and count hits from some country mad_penguin Programming 5 03-26-2011 04:02 AM
Possibly the simplest question in this section? (About Installing) Thecovester DamnSmallLinux 3 11-23-2010 11:30 AM
LXer: Quick Hits From Around the Ruby World LXer Syndicated Linux News 0 08-16-2006 08:21 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 02:09 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration