How to view the status of remote server files in Linux

How to view the status of remote server files in Linux

As shown below:

The test command determines whether a file exists:

ssh usrname@remotehost "test -e remote_file_path"

The stat command gets the timestamp of when a file was last modified:

ssh usrname@remotehost "stat -c %Y remote_file_path"

The above method of checking the remote server file status in Linux is all the content that the editor shares with you. I hope it can give you a reference. I also hope that you will support 123WORDPRESS.COM.

You may also be interested in:
  • How to check whether the ports of the local computer and the remote server are connected under Linux
  • Linux uses the scp command to copy files to the local computer and copy local files to the remote server
  • Connect to the remote server through jsch in Java to execute linux commands
  • Detailed explanation and examples of file transfer between Linux and Windows
  • C language implementation of socket file transfer under Linux
  • Linux network programming: reliable file transfer example based on UDP
  • Linux network programming socket file transfer example
  • How to connect to a remote server and transfer files via a jump server in Linux

<<:  How to fix abnormal startup of mysql5.7.21

>>:  mysql5.7.22 download process diagram

Recommend

js to realize the function of uploading pictures

The principle of uploading pictures on the front ...

Use of Linux file command

1. Command Introduction The file command is used ...

JavaScript explains the encapsulation and use of slow-motion animation

Implementing process analysis (1) How to call rep...

Use image to submit the form instead of using button to submit the form

Copy code The code is as follows: <form method...

Centos6.9 installation Mysql5.7.18 step record

Installation sequence rpm -ivh mysql-community-co...

HTML basic summary recommendation (title)

HTML: Title Heading is defined by tags such as &l...

Detailed explanation of how to use CMD command to operate MySql database

First: Start and stop the mysql service net stop ...

A good way to improve your design skills

So-called talent (left brain and right brain) Tha...

Sample code on how to implement page caching in vue mobile project

background On mobile devices, caching between pag...

A detailed introduction to for/of, for/in in JavaScript

Table of contents In JavaScript , there are sever...

How to use geoip to restrict regions in nginx

This blog is a work note environment: nginx versi...

A simple way to call desktop exe programs on a web page

This article mainly introduces how to call desktop...

Implementation of MySQL Multi-version Concurrency Control MVCC

Table of contents What is MVCC MVCC Implementatio...