Menu
Newbedev LogoNEWBEDEV Python Javascript Linux Cheat sheet
Newbedev LogoNEWBEDEV
  • Python 1
  • Javascript
  • Linux
  • Cheat sheet
  • Contact

Getting disk usage for each user

The shell does a single pass on expanding parameters, so $user is expanded, but the preceding ~ isn't then expanded. In order to reparse the input line, use eval:

...
eval sudo du -sh ~$user
...

Tags:

Linux

Bash

User

Related

How to remove the "3D Objects" entry from Windows 10 Explorer? Windows 10 - Users already logged in at boot Get a Telegram notification only when a word is used on a channel On Windows, cannot print a Medium blog post without code being cropped out How to paste into nano from clipboard? Sending text messages (SMS) from Outlook 2016 for Mac Difference between bootmgr.efi and bootmgfw.efi Bulk crop images from CMD/PowerShell How do I speed up a video by 60X in ffmpeg? Are the start bit and the stop bit(s) optional in serial communication? Batch Script - Parenthesized echo of the word "Where" issue Custom Formula Not Updating

Recent Posts

Pandas how to find column contains a certain value Recommended way to install multiple Python versions on Ubuntu 20.04 Build super fast web scraper with Python x100 than BeautifulSoup How to convert a SQL query result to a Pandas DataFrame in Python How to write a Pandas DataFrame to a .csv file in Python
© 2021 newbedevPrivacy Policy