Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

452
Vistas
Supressing 'Permission Denied' warning in du command

I want to list the size of all sub-folders in a directory. when I try du -h --max-depth=1 the output is cluttered with 'Permission denied' statements as such

du: cannot read directory `./folder_name': Permission denied

How can I suppress these warnings?

I tried a workaround by piping the the output to grep as follows

du -h --max-depth=1 | grep -v 'du:'

but that does not seem to be working either!

over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

Try:

$ du -h --max-depth=1 2>/dev/null

This redirects stderr (file handle 2) to /dev/null, ignoring any error messages.

over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda