---
title: "得到最新修改的文件名"
author: "rainytooo"
date: "2010-03-17T09:59:36Z"
tags: ["F#", "脚本"]
categories: ["操作系统"]
slug: "untitled"
draft: false
lastmod: "2010-03-17T09:59:36Z"
id: 617773
url: "https://rainytooo.iteye.com/blog/617773"
---

在服务器上写部署项目的脚本 ,需要把上传来的最新的项目解压, 部署 ,启动服务 实现自动化

于是找到最新的文件是第一件事情

就得到了以下脚本

```
$ ls -lrt | awk '/xmhi/ { f=$NF };END{ print f }'
```

中间的xmhi是文件所包含的字符串