新修改的文​​件,在CMD中创建并列出大文件 [英] Newly Modified file , created and list huge files in CMD

查看:117
本文介绍了新修改的文​​件,在CMD中创建并列出大文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在aws服务器(EC2)中有magento 2.2.6网站。我正在使用cmd中的ssh从Windows 10计算机连接到该aws服务器。我在aws服务器中有一个名为Var的目录(文件夹)。在var文件夹中,有很多文件和子文件夹。现在我有以下问题

I have magento 2.2.6 website in aws server (EC2).I am connecting to that aws sever using ssh in cmd From my windows 10 computer . I have a directory (folder) named Var in aws server. Inside var folder there are so many files and sub folder . Now i have the following question

1)我想知道最近修改的文件列表(或者我想在今天下午2.00pm之后修改文件)

1) I want to know the list of last modified files (or i want to get file modified after 2.00pm today )

2)我想知道最近创建的文件列表(或者我想在今天下午2.00pm之后修改文件)

2) I want to know the list of last created files (or i want to get file modified after 2.00pm today )

3)我要列出文件或文件夹的大小大于1 gb

3) I want to list the files or folders that have size more than 1 gb

4)我想知道一个文件夹的文件夹大小

4) I want to know the folder size of one folder

请帮助解决此问题。我想要cmd代码。实际上,我的网站上有问题。为了解决这个问题,我必须得到这些问题的答案。请帮忙。

Please help to solve this issue . I want cmd code . Actually i have issue in my website . To solve that i have to get the answer for these questions . Please help .

推荐答案

您可以使用 du -sh 来获取文件夹尺寸。 此处
您可以使用'ls -halt'按日期对文件进行排序或使用 ls -haltr 对其进行反转,您可以阅读此stackexchange 链接,了解如何

You can use du -sh to get folder size. More examples are available here. You can use 'ls -halt' to sort files by date or reverse it using ls -haltr, you your can read this stackexchange link on how to sort by date using various other ways.

您可以使用 find。键入f -size + 1000M 查找大于1GB的文件,或者如果要将其限制为当前文件夹,则可以使用 find。 -maxdepth 1 -type f -size + 1000M 。您可以阅读此链接如何查找大于或小于的文件。

You can use find . -type f -size +1000M to find files lager than 1GB, or if you want to limit it to the current folder you can use find . -maxdepth 1 -type f -size +1000M. You can read this link on how to find files larger or smaller than.

这篇关于新修改的文​​件,在CMD中创建并列出大文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆