大佬教程收集整理的这篇文章主要介绍了Windows PowerShell中的Windows?,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
以下给出了当前目录中每个文件的大小:
foreach ($o in gci) { Write-output $o.Length }
“An implementation of ‘du -s *’ in Powershell”
function directory-sumMary($dir=".") { get-childitem $dir | % { $f = $_ ; get-childitem -r $_.FullName | measure-object -property length -sum | SELEct @{name="Name";Expression={$f}},Sum} }
输出:
PS C:\Python25> directory-sumMary Name Sum ---- --- DLLs 4794012 Doc 4160038 include 382592 Lib 13752327 libs 948600 tcl 3248808 Tools 547784 LICENSE.txt 13817 NEWs.txt 88573 python.exe 24064 pythonw.exe 24576 README.txt 56691 w9xpopen.exe 4608
以上是大佬教程为你收集整理的Windows PowerShell中的Windows?全部内容,希望文章能够帮你解决Windows PowerShell中的Windows?所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。