Most Unix commands, including ls
, will write regular output to standard output and error messages to standard error, so you can use Bash redirection to throw away the error messages while leaving the regular output in place:
ls *.zip 2> /dev/null
More Related Contents:
- How to read a file line by line and making a new file for each line having same filename as last word of each line? [closed]
- Why to code a script which will check if some package is installed in linux and if not then install it?
- How to permanently set $PATH on Linux/Unix [closed]
- How do I use sudo to redirect output to a location I don’t have permission to write to? [closed]
- Aborting a shell script if any command returns a non-zero value
- Bash ignoring error for a particular command
- How to replace spaces in file names using a bash script
- Use sudo with password as parameter [closed]
- How can I quickly sum all numbers in a file?
- Bash script process substitution Syntax error: “(” unexpected
- Setting environment variables in Linux using Bash
- Get the Perl rename utility instead of the built-in rename
- Run a shell command when a file is added
- How do I syntax check a Bash script without running it?
- Pass a password to ssh in pure bash
- extracting unique values between 2 sets/files
- Linux non-blocking fifo (on demand logging)
- Bash script execution with and without shebang in Linux and BSD
- Variable in Bash Script that keeps it value from the last time running
- bash command not found when setting a variable
- How to obtain the number of CPUs/cores in Linux from the command line?
- How do I get cURL to not show the progress bar?
- Move all files except one
- Linux: remove file extensions for multiple files
- Joining multiple fields in text files on Unix
- Counter increment in Bash loop not working
- Start script after another one (already running) finishes
- Problem with Bash output redirection [duplicate]
- bash: set array env variable and de-referencing it from any shell script fails
- Why exit code 141 with grep -q?