Jump to content

Regex help needed

Recommended Posts

Hey guys,

I am working on a script that will output the top 20 folders / files in Linux volumes when a drive space alert is generated.

I was looking to get some assistance with the regex to find the match the Linux volumes from the shell commands below:


df -h awk '$6 -- "/db" {print $5}' tr -d '%\n'
df -h awk '$6 -- "/" {print $5}' tr -d '%\n'
df -h awk '$6 -- "/data" {print $5}' tr -d '%\n'


So far i have  \/[a-z]+ but it will find all volumes except "/".


Any ideas?

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...