How Do I get the full path of the file that was changed/modified - watchman

I am trying to use watchman to get the directory of the file that was changed. But watchman only returns the file name in the log. Is there a way to configure my watchman trigger config with append-files param so I can get the full path of the file?

Related

Perl Net::FTP not lists particular file

I am trying to list the file of remote host using Net::FTP Perl module. Later I want to download it using put command.
Will it possible to list the particular file using ls command
Syntax I am using is:
$remote_dir = "/home/user/test_dir/";
$ftp->cwd($remote_dir);
$file_name = "test.txt";
print $ftp->ls($file_name);
This file is exists in remote server when I tried checking it manually. But listing is not happening.
ftp->ls(); is used for only listing the directory contents or can it be used to list the particular file from a directory as I mentioned above?
ftp->ls(); is used for only listing the directory contents or can it be used to list the particular file from a directory
From the documentation:
ls ( [ DIR ] )
Get a directory listing of DIR, or the current directory.
Thus, it is clearly documented to list a directory, not a specific regular file.

install4j: Installation doesnt create an alternativeLogfile

When i Invoke the installer with:
installerchecker_windows-x64_19_2_1_0-SNAPSHOT.exe
-q
-c
-varfile install.varfile
-Dinstall4j.alternativeLogfile=d:/tmp/logs/installchecker.log
-Dinstall4j.logToStderr=true
it creates and writes the standard log file installation.log in the .install4j Directory, but doesnt create my custom log in d:/tmp/logs. As configured there is an additional error.log with the correct content.
The installation.log shows the comand-line config : install4j.alternativeLogfile=d:/tmp/logs/installchecker.log
The Directory d:/tmp/logs has full access.
Where is the failure in my config ?
The alternative log file is intended to debug situations where the installer fails. To avoid moving the log file to its final destination in .install4j/installation.log, the VM parameter
-Dinstall4j.noPermanentLogFile=true
can be specified.

How to overwrite existing files with ncftpget?

When getting a remote ftp file that exists in the local destination
ncftpget says that
local file appears to be the same as the remote file, download is not necessary.
What does appears mean? How does ncftpget check if this is the same file?
It seems that it compares time and size of the file. But does it compare content or at least checksum?
Is there a way to force to overwrite the existing file. Of course other than remove it first.

How to get the current config filename

I want to be able to output the currently loaded config filename, is this possible?
I want to basically write out a log entry with the config filename so I know which config file loaded just to verify things.

Can not setcwd to relative home directory (perl) Net::SFTP::Foreign

I am trying to access remote server via SFTP. I am using Net::SFTP::Foreign for this. Problem arises when I try to change directory to to user's home directory. It is not allowing to change directory as in shell.
cd ~
cd ~/folder
My perl code is as follows.
$sftp->setcwd("~/aast-backup/$backup_type") or die "unable to change cwd: " . $sftp->error;
Error shown
unable to change cwd: Couldn't get realpath for remote '/home/ftpkasi/aast-backup/~/aast-backup/differential
Please show some light into this. Thanks in advance...
The answer is in the documentation for the cwd method:
$sftp->cwd
Returns the remote current working directory.
When a relative remote path is passed to any of the methods on this package, this directory is used to compose the absolute path.
So the relative path you're passing to setcwd is being appended to your initial cwd. You can see this in the error message you get. The initial cwd is
/home/ftpkasi/aast-backup/
and when you call
$sftp->setcwd("~/aast-backup/$backup_type")
it tries to change to the directory
/home/ftpkasi/aast-backup/~/aast-backup/differential
which obviously doesn't exist.