这是我正在使用的命令的示例:
rsync --list-only --include "*2012*.xml" -exclude "*.xml" serveripaddress::pt/dir/files/ --port=111 > output.txt
Run Code Online (Sandbox Code Playgroud)
如何在没有权限,时间戳等额外信息的情况下获取文件名列表?
编辑:是否可以在新行上输出每个文件名?
在什么情况下每个解决方案优先于另一个?
例1:
if (personList.Any(x => x.Name == "Fox Mulder"))
{
this.Person = personList.Single(x => x.Name == "Fox Mulder");
}
Run Code Online (Sandbox Code Playgroud)
例2:
var mulder = personList.SingleOrDefault(x => x.Name == "Fox Mulder");
if (mulder != null)
{
this.Person = mulder;
}
Run Code Online (Sandbox Code Playgroud) 在下面的示例中,如果代码离开using语句后它仍在运行,那么该进程会发生什么?
using (var p = new Process())
{
p.StartInfo.FileName = "c:\\temp\\SomeConsoleApp.exe";
p.Start();
}
Run Code Online (Sandbox Code Playgroud) 假设我正在处理一个大型项目,我需要在名为example.c的源文件中访问函数foo().foo()的原型也在example.c中声明.example.c没有特定于此文件的标头,例如example.h.从我正在处理的新源文件中访问example.c的foo()的最佳做法是什么?