What is /dev/null in Unix?

Asked by Last Modified  

6 Answers

Learn Linux

Follow 6
Answer

Please enter your answer

Linux Administration Certification and UNIX Shell Scripting

It is a bit bucket in Unix where you dump things you don't need. When you need to discard output from your command , you can redirect it to /dev/null. In Unix, an external device is treated as a file. All such devices are found as files in /dev directory. It is a Null device . Suppose you need to...
read more
It is a bit bucket in Unix where you dump things you don't need. When you need to discard output from your command , you can redirect it to /dev/null. In Unix, an external device is treated as a file. All such devices are found as files in /dev directory. It is a Null device . Suppose you need to search for a pattern, but do not need it to be displayed to the console, but need the exit code of the command, we can do grep pattern filename > /dev/null # search without displaying it to console. echo $? # exit code You can also redirect your standard error messages from a command to /dev/null as $cmd 2> /dev/null Here 2> represents standard error. /dev/null is the bit-bucket: the place where you dump anything you don't need. /dev/null is a special file-system object that throws away everything written into it. Redirecting a stream into it means hiding an output. read less
Comments

Programming Language Trainer - Java, Python, .NET, Power BI, Tableau, Excel, SQL, Data Analytics

it is used to dispose off unwanted files or devices in Unix. it is a special file, not a directory, therefore, one cannot use mv command to move files in /dev/null.
Comments

Training Professional

/dev/null is the null file Is is a special file which contains nothing.
Comments

Linux Admin Trainer

/dev/null is a file. if we want to nullify something we can redirect the output to this file. Ex: find / -name linux >> /dev/null
Comments

Trainer

Its a file which stands for the null file or if i comoare it with windows OS,we can call it as a permanently deleting the file by pressing Shift+del key .
Comments

IT Professional Trainer with 13 Years of Experience

its an black hole you can send any junk data.
Comments

View 4 more Answers

Related Questions

Which is the best book for the reference of Linux?
Linux: The Complete Reference
Profile Photo
Aneeshwara
My name is Rajesh , working as a Recruiter from past 6 years and thought to change my career into software (development / admin/ testing ) am seeking for some suggestion which technology I need to learn ? Any job after training ? Or where I can get job within 3 months after finishing my training programme- your advices are highly appreciated
Mr rajesh if you want to enter in to software Choose SAP BW AND SAP HANA because BW and HANA rules the all other erp tools next 50 years.it provides rubust reporting tools for quicker decesion of business It very easy to learn
Profile Photo
Rajesh
1 0
View Comments6
Hi my name is Raja i have 8 Years Expnt in Desktop Support i Need to change my Platform From linux basic are Network Base Work
Hi Raja, As you said, you already have some experience on desktop support, so better choose Linux Administration. First learn basic level of Linux Administration from any institute, then go to real time...
Profile Photo
Rajasubramanian
I am having 5+ years exp in civil engineering now I am thinking to move in IT sector can u suggest me which field is better to learn ? I am thinking to do Linux+devops+aws or powerBi 
Hi Waseem, I am a Devops and cloud engineed since last approximatelt 4 years.Linux,DevOps (techniques and tools) and Cloud, all are very much intera-related. DevOps and Cloud both are burning needs in...
Profile Photo
Waseem

Now ask question in any of the 1000+ Categories, and get Answers from Tutors and Trainers on UrbanPro.com

Ask a Question

Related Lessons

LINUX - SETTING UP YUM REPOSITORY
If we buy RHEL 7 the system by default will be connected to Red Hat Network (RHN). All packages and updates will be installed from RHN. So RHN will be our main source and repository. Since we have...
A

Aseem A.

1 0
View Comments0

Introduction to Programming Languages
What is a Programming Language? A programming language is a formal computer language or constructed language designed to communicate instructions to a machine, particularly a computer. Programming languages...
Profile Photo

How To Start Shell Scripting?
Hi learners, I would like to share my knowledge in shell scripting: Every new Linux learners goal is to learn shell scripting. But only a few starts quickly writing the shell scripts.Why? The reasons...
Profile Photo

Be prepared to get trained--init
Before starting the training,students must be mentally prepared for acceptance of new knowledge. Students must attend training with open minded forgetting the position they are working.This will help...
S

Smartnub Softsolutions

0 0
View Comments0

LINUX SERVER ADMINISTRATION
Permissions in Linux rwx|rwx|rwx =user | group | others R==4 W==2 X==1 what's the total? 421|421|421 777 So 7 has 4, 2,1==which means full. Permission (that is read write and execute) ...
Profile Photo

Recommended Articles

Software Development has been one of the most popular career trends since years. The reason behind this is the fact that software are being used almost everywhere today.  In all of our lives, from the morning’s alarm clock to the coffee maker, car, mobile phone, computer, ATM and in almost everything we use in our daily...

Read full article >

Almost all of us, inside the pocket, bag or on the table have a mobile phone, out of which 90% of us have a smartphone. The technology is advancing rapidly. When it comes to mobile phones, people today want much more than just making phone calls and playing games on the go. People now want instant access to all their business...

Read full article >

Information technology consultancy or Information technology consulting is a specialized field in which one can set their focus on providing advisory services to business firms on finding ways to use innovations in information technology to further their business and meet the objectives of the business. Not only does...

Read full article >

Hadoop is a framework which has been developed for organizing and analysing big chunks of data for a business. Suppose you have a file larger than your system’s storage capacity and you can’t store it. Hadoop helps in storing bigger files than what could be stored on one particular server. You can therefore store very,...

Read full article >

Looking for Linux Training?

Learn from the Best Tutors on UrbanPro

Are you a Tutor or Training Institute?

Join UrbanPro Today to find students near you