One or a set of directives issued in the *nix environment to get information, change the state of something or to execute something. In other words: To gain an objective.

learn more… | top users | synonyms

75
votes
6answers
6k 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?
33
votes
2answers
1k 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 ...
5
votes
1answer
140 views

What does `init [2]` mean in the COMMAND column of ps?

Reading What do the brackets around processes mean? I understand that the executable name is printed. Linux ps man page: Sometimes the process args will be unavailable; when this happens, ps will ...
7
votes
2answers
4k 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 ...
1
vote
4answers
204 views

List all commands that a shell knows

What can I type at my shell (which happens to be bash) that will list all the commands that are recognized? Also, does this differ by shell? Or do all shells just have a "directory" of commands they ...
82
votes
3answers
8k views

Why is “echo” so much faster than “touch”?

I'm trying to update the timestamp to the current time on all of the xml files in my directory (recursively). I'm using Mac OSX 10.8.5. On about 300,000 files, the following echo command takes 10 ...
25
votes
2answers
6k views

How to stop the find command after first match?

Is there a way to force the find command to stop right after finding the first match?
20
votes
2answers
614 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
2k 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?
5
votes
3answers
814 views

What does “rm is hashed” mean?

I'm going through http://mywiki.wooledge.org/BashGuide/CommandsAndArguments and came across this: $ type rm rm is hashed (/bin/rm) $ type cd cd is a shell builtin Just a little earlier, the guide ...
3
votes
3answers
2k views

How to list available app commands in terminal

I'm using fluxbox and recently i wanted to start an application for video editing and i couldn't remember it's name. I usually run apps from terminal so I was wondering is there a way to list all ...
2
votes
3answers
1k views

Why does Firefox refuse to die despite killing it with pkill -9?

I am issuing the following command to kill Firefox on my Red Hat Linux box: [subhrcho@slc04lyo ~]$ pkill -9 -f firefox [subhrcho@slc04lyo ~]$ However, when I try to invoke Firefox through ...
0
votes
2answers
193 views

Why does this compound command report errors when copying directories?

if one executes the following two commands in one line, as follows, rm -rf dir ; cp -r dir2 dir it may complain that cp can not create directory dir/subdir: File exists but if these two commands ...
68
votes
15answers
11k views

What are the legitimate uses of the `touch` command?

What's the point of the touch command? I know I can create empty files with it, but so is also the case with echo -n. Otherwise, why would someone need to change the timestamps of a file? Unless to ...
5
votes
3answers
1k views

Difference between 'ifconfig' and 'ip' commands

I read some articles/tutorials on 'ifconfig' command, most of them included a common statement - "ifconfig is deprecated by ip command" and suggested to learn ip command. But none of them ...
13
votes
1answer
516 views

What does yes $(yes yes) do?

Wondering what use the yes command might be, I stumbled upon this comment, and tried to execute yes $(yes yes) From what I understand, this should simply print out an infinite sequence of yes, but ...
12
votes
4answers
673 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 ...
2
votes
3answers
2k views

What is the purpose of -e in sed command?

I can't find any documentation about the sed -e switch, for simple replace, do I need it? e.g. sed 's/foo/bar/' VS sed -e 's/foo/bar/'
0
votes
2answers
176 views

What is the Run prompt equivalency in Linux?

In Windows, there is the Run prompt, which you can access with Win+R key. What is the equivalency to this in Linux? Is there even such a thing or is the Terminal the main prompt you would use in ...
8
votes
0answers
208 views

how to get exit status from the command before the last [duplicate]

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 ...
6
votes
4answers
127 views

Is there a tool for summarizing what all commands do?

So I understand that there are man pages for getting the documentation when the internet is unavailable, or when you need advanced uses, but what if I'm offline and I don't even know what tool I need ...
6
votes
2answers
3k 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. ...
0
votes
2answers
1k views

Why screen is not splitting my GNOME terminal?

I am working in a remote Linux box using VNC.I have a single terminal with lots of tabs opened in my system. How can I split them using the screen utility? Does the screen utility work with already ...
0
votes
3answers
4k views

What is the difference between ps and top command?

What is the difference between ps and top command ? I see that both can display information about running processes . Which one should be used when ?