LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 02-13-2020, 10:12 AM   #1
MdAyq
LQ Newbie
 
Registered: Jan 2020
Posts: 5

Rep: Reputation: Disabled
make sshfs transmit the file time precisely


When I ssh into a remove machine and take the precise time of a file there, I get

Code:
user@remotemachine:~$ ls --full-time <file> 
-rw------- 1 <user> <group> 204173 2020-02-06 13:37:01.333888816 +0100 <file>
However, if I sshfs to that machine instead and read the precise time of the same remote file locally, I get

Code:
user@localmachine:~$ ls --full-time <file>
-rw------- 1 <somenumber> <othernumber> 204173 2020-02-06 13:37:01.000000000 +0100 <file>
As you see, the digits of the seconds after the decimal point are lost. Any idea of how to make sshfs transmit the precise time by default?

The remote machine runs Gentoo 2.6, the local one Ubuntu 19.10.

Last edited by MdAyq; 02-13-2020 at 11:02 AM.
 
Old 02-13-2020, 10:43 AM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 19,560

Rep: Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158
sshfs is a fuse filesystem that basically uses the sftp protocol. If the sftp ls command does not provide the full iso time then neither does sshfs. I have not tried so I don't know and I can't test this at the moment.

If sftp does then there could be a bug somewhere in the fuse implementation. Otherwise one would have to look at the sftp implementation of the ls command.
 
Old 02-15-2020, 07:21 AM   #3
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 13,432
Blog Entries: 9

Rep: Reputation: 3670Reputation: 3670Reputation: 3670Reputation: 3670Reputation: 3670Reputation: 3670Reputation: 3670Reputation: 3670Reputation: 3670Reputation: 3670Reputation: 3670
FWIW, sshfs utilises ssh and to my knowledge ALL ssh options can be passed.
Code:
man sshfs
 
Old 02-16-2020, 08:07 PM   #4
michaelk
Moderator
 
Registered: Aug 2002
Posts: 19,560

Rep: Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158
Technically sshfs does utilize ssh because sftp is a subsystem of ssh. I finally got a change to go back and look at the sftp man page. These are the options supported by the sftp ls command.

Quote:
s [-1aflnrSt] [path]
Display a remote directory listing of either path or the current directory if path is not specified. path may contain glob(3) characters and may match multiple files.

The following flags are recognized and alter the behaviour of ls accordingly:

-1' Produce single columnar output.

-a' List files beginning with a dot ('.').

-f' Do not sort the listing. The default sort order is lexicographical.

-l' Display additional details including permissions and ownership information.

-n' Produce a long listing with user and group information presented numerically.

-r' Reverse the sort order of the listing.

-S' Sort the listing by file size.

-t' Sort the listing by last modification time.
It limited with respect and does not support the full time options as the regular ls command.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
LXer: Review: 12.04, precisely what was needed. LXer Syndicated Linux News 0 04-24-2012 07:00 PM
[SOLVED] What Precisely is a Rolling Distro or Release? theKbStockpiler Linux - General 12 04-09-2012 08:56 PM
LXer: Open Source has won precisely because we no longer notice it LXer Syndicated Linux News 0 11-25-2010 08:30 AM
Clock always precisely 1 hour fast Emma77 Debian 6 10-14-2006 03:43 PM
Precisely what versions support HPT374? BigMadDrongo Slackware 0 06-23-2003 01:38 PM

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

All times are GMT -5. The time now is 05:19 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration