The command tag has no wiki summary.
56
votes
6answers
4k views
Why is cd not a program?
I've always wondered why cd isn't a program, but never managed to find the answer.
Anyone know why this is the case?
17
votes
2answers
438 views
What is `--` called?
Recently I got to know of -- that is double-hyphen which is used to tell a command that the option list has ended and what follows should not be considered as a option. So,
grep -- 'search_word' *
...
17
votes
2answers
477 views
What is the point of the `cd` external command?
As referenced in this fine answer, POSIX systems have an external binary cd in addition to the shell builtin. On OS X 10.8 it's /usr/bin/cd. You can't use it like the builtin cd since it exits ...
16
votes
3answers
569 views
Which are the standard commands available in every Linux system?
I would like to know which are the standard commands available in every Linux system.
For example if you get a debian/ubuntu/redhat/suse/arch/slackware etc, you will always find there commands like:
...
14
votes
2answers
533 views
How to stop the find command after first match?
Is there a way to make the find command to stop right after finding the first match?
10
votes
4answers
533 views
What is the difference between running a executable just by name and by appending a dot /slash before it?
This is the output from ls -all command :
-rwxr----- 1 subhrcho dba 3600 Nov 13 17:26 jdev
-rw-r----- 1 subhrcho dba 1566 Nov 13 17:26 jdev-Darwin.conf
-rw-r----- 1 subhrcho dba 347 Mar 6 2009 ...
9
votes
2answers
415 views
What's the reason for this specific “rm” sequence in the xkcd joke?
Here's part of this xkcd comic strip where the idea is that the author can't write a sort program so he adds code to delete all files
system("rm -rf ./");
system("rm -rf ~/*");
system("rm -rf /");
...
8
votes
2answers
142 views
how to get exit status from the command before the last
I have solaris machine ( solaris 10 )
please Look on the following simple commands (haconf -makerw | grep -iq "Cluster already writable")
# haconf -makerw
VCS WARNING V-16-1-10364 Cluster ...
7
votes
2answers
2k views
How to run time on multiple commands AND write the time output to file?
I want to run time command to measure time of several commands.
What I want to do is:
Measure the time of running of all of them added together
Write the time output to a file
Write the STDERR from ...
6
votes
1answer
424 views
The “yes” command
There is a yes command in unix/linux which basically infinitely prints y to the stdout. What is the point of it, and how is it useful?
6
votes
3answers
372 views
Difference between commands in bash script and commands in terminal
Are there any differences between commands that you type into the terminal and commands you include in a script?
5
votes
2answers
176 views
Which of these three commands is telling the TRUE Redhat release information
I was checking for the Redhat release so this time I used three different commands. Two commands gave the same result but the third command gave different result. Which one is right.
...
5
votes
2answers
114 views
Why is cd not a file in /bin? [duplicate]
Possible Duplicate:
Why is cd not a program?
I noticed that every other commonly used util, like ls, cp, rm, etc. are actually files in /bin -- but cd is not. Nor is it in any other ...
5
votes
2answers
1k views
Execute command in remote active terminal
Suppose you have a terminal emulator (T1) open with a PID of 6350.
From another terminal, type this command (C1):
echo "ls\n" > /proc/6350/fd/0
This writes ls and the new line in T1 but does ...
4
votes
3answers
211 views
Linux Rename File Beginning with “--” [duplicate]
Possible Duplicate:
How do I delete a file whose name begins with “-” (hyphen a.k.a. dash or minus)?
This is an awkward one, I have received some files from a windows machine ...