spark读文件列名字_以人类可读格式列出文件

spark读文件列名字

I maintain an older computer with a small hard drive.  I use it mostly for storing MP3s, videos, and other types of basic media.  Unfortunately I often get warnings that disk space is low and so I need to delete files I no longer need; i.e. music or movies I have probably grown tired of.  I always sort them by size, largest first, so I can find out where the cogs are.

我维护的是一台旧电脑,硬盘较小。 我主要将其用于存储MP3,视频和其他类型的基本媒体。 不幸的是,我经常收到磁盘空间不足的警告,因此我需要删除不再需要的文件。 即我可能已经厌倦的音乐或电影。 我总是按大小排序,最大的优先,所以我可以找出齿轮的位置。

The problem is I try to stick to command line but only know how to do that sorting with human readable format by using Mac's Finder utility.  I recent found a command which will output the contents of the current directory and its subdirectories by human readable size:

问题是我尝试坚持使用命令行,但只知道如何使用Mac的Finder实用程序以人类可读的格式进行排序。 我最近发现了一个命令该命令将按人类可读的大小输出当前目录及其子目录的内容:

du -sk -- * | sort -n | perl -pe '@SI=qw(K M G T P); s:^(\d+?)((\d\d\d)*)\s:$1." ".$SI[((length $2)/3)]."\t":e'

That command is kinda gross so you'll probably want to save it as an alias.  Nonetheless I now know how to get the desired information from command line!

该命令有点麻烦,因此您可能需要将其另存为别名。 尽管如此,我现在知道如何从命令行获取所需的信息!

翻译自: https://davidwalsh.name/list-files-human-readable-format

spark读文件列名字

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值