-rw-rw-r-- 1 pstambia pstambia 131721 Apr 9 2018 DPT_p_EXT_CONTRACT.deliv
-rw-rw-r-- 1 pstambia pstambia 122364 Nov 28 22:56 DPT_p_EXT_CRC.deliv
-rw-rw-r-- 1 pstambia pstambia 137893 Apr 9 2018 DPT_p_EXT_CRENGLOG.deliv
-rw-r--r-- 1 pstambia pstambia 120692 Oct 29 09:36 DPT_p_EXT_COLLQ4.deliv
-rw-r--r-- 1 pstambia pstambia 118732 Oct 29 09:36 DPT_p_EXT_COLLQ5B.deliv
最后我只想保留
-rw-rw-r-- 1 pstambia pstambia 131721 Apr 9 2018
答案1
使用 Notepad++,如果您想删除每一行的文件名:
- Ctrl+H
- 找什么:
\h+\S+$
- 用。。。来代替:
LEAVE EMPTY
- 检查环绕
- 检查正则表达式
- Replace all
解释:
\h+ # 1 or more horizontal spaces
\S+ # 1 or more non space characters
$ # end of line
给定示例的结果:
-rw-rw-r-- 1 pstambia pstambia 131721 Apr 9 2018
-rw-rw-r-- 1 pstambia pstambia 122364 Nov 28 22:56
-rw-rw-r-- 1 pstambia pstambia 137893 Apr 9 2018
-rw-r--r-- 1 pstambia pstambia 120692 Oct 29 09:36
-rw-r--r-- 1 pstambia pstambia 118732 Oct 29 09:36