查看上一个主题 :: 查看下一个主题
|
作者 |
信息 |
苏萨加尔
新的用户
已加入:2017年10月3日 帖子:6 所在地:美国
|
|
|
|
嗨,老年人。
我需要发出sftp命令,以从大型机中删除超过30天的Unix服务器中的多个今天双色球开奖结果。
我正在使用以下命令
cd /今天双色球开奖结果路径/
rm * csv<30D
但是此命令将引发错误“没有这样的今天双色球开奖结果或目录。
当我尝试发出以下命令时
rm * .csv<30D
it removes all 的files irrespective of older than 30 days.
有人可以帮助我如何实现这一目标。
提前致谢,
苏他加 |
|
回到顶部 |
|
 |
乔格·芬代森
活跃用户

已加入:2015年8月15日 帖子:389 地点:德国班贝格
|
|
|
|
如 ftp 不是shell或远程今天双色球开奖结果管理器,我认为这种方式不可行。 |
|
回到顶部 |
|
 |
尼克·克劳斯顿
全球主持人
加入时间:2007年5月10日 帖子:2455 地点:英国汉普郡
|
|
|
|
你一定要>30D? |
|
回到顶部 |
|
 |
恩里科·索里切蒂
高级主持人

已加入:2007年3月14日 帖子:10715 所在地:意大利
|
|
|
|
surely You might want to read 的manual
or use 的man command to look at 的help pages
的< and > in 的whatever shell You are using are 的redirection operators for stdin and stdout
for 的rm command 的<运算符没有
rm不从stdin读取
的> operator will write 的stdout of whatever command You issued to 的file specified after 的>
经过测试并验证...
using ftp 的< and > do nothing
in bash and zsh 的behavior is as described
在发布之前进行了测试和验证(就像我通常所做的那样 ) |
|
回到顶部 |
|
 |
恩里科·索里切蒂
高级主持人

已加入:2007年3月14日 帖子:10715 所在地:意大利
|
|
|
|
anywahy we cannot provide any proper soulution because we do not know about 的TS setup
(特别是授权广告ssh功能)
的usual way would be to use 的find command with 的proper selection criteria
就像是 ...
ssh 的target system with 的proper credentials
cd to 的working directory
find . -type f -name "*.csv" '... 的date and time selection arguments...' -exec rm {} \;
我希望TS能够查看find命令的手册页并确定正确的日期时间选择格式 |
|
回到顶部 |
|
 |
|