Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Perl の NET::SSH2 パッケージを介して SFTP を使用しています。opendir 関数を使用すると、フォルダ内のファイルを一覧表示できます。
最新の変更されたファイルが最後になるように、ファイルを時間順に並べたいと思います。それは可能ですか?
exec('ls -t')プレーンを使用して実行することはできませSSHんか? (なしSFTP)。
exec('ls -t')
SSH
SFTP
何かのようなもの:
my $chan = $ssh2->channel(); $chan->exec('ls -t'); # executed in the dir you would like to get the files sorted from