Red Hat Linux 7.1 Linux Shells
What do the following shells do?
/bin/sh
/bin/csh
/bin/false
/bin/bash
/bin/sync
/bin/shutdown
/bin/halt
/dev/null
/bin/true
/bin/bash2
/bin/ash
/bin/bsh
/bin/tcsh
Thank u so much for ur answers to me.
Linux
What do the following shells do?
/bin/sh
/bin/csh
/bin/false
/bin/bash
/bin/sync
/bin/shutdown
/bin/halt
/dev/null
/bin/true
/bin/bash2
/bin/ash
/bin/bsh
/bin/tcsh
Thank u so much for ur answers to me.
by cpfeiffe
sh, csh, bash, true, bash2, ash, bsh and tcsh are all programming shells. They provide a user environment to maneuver around the file system in. sh and csh are the most common. bash and bash2 (newer) are very userful. true and false are actullaymore like programs. They are used as shells for security reasons, because they restrict users. true will validate a user and then exit so it is good for users that need FTP and nothing else. They can connect via FTP, but won't be able to telnet.false gives up no shell at all. This is good for anonymous ftp.
sync is used to write memory to disk. shutdown and halt are used to stop the machine. shutdown is safer than halt.
Think of /dev/null as the black hole. It is a device file, but it is totally empty. You can use it to zero out a file (cat /dev/null > file). You can also dump data on it that you no longer need (good for dumping command output within a script that you don't need to log). For example, in a script, youmight see - command > /dev/null. The results of command are sent to /dev/null or in other words gone forever and not recorded anywhere.
Be careful with /dev/null if you are at risk of security. Hackers are constantly reading /dev/null to recordany information being sent to it. Some clever ones even pipe to it in a stream so if you try to zero a file you will get whatever they are piping into /dev/null in your file.
I hope this was helpful.
by choth
Dear Sir:
Thank you so much sir for your helpful answer.
Sincerely yours,
Chan Choth
by choth
This discussion is closed to new replies.
Sort by Trending