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

6
votes
3answers
560 views

Get a list of 3 letter commands on Mac OS X

How can I either create or find a list of 3-letter unix commands on Mac OS X? I'd like to create a new program/command for a project. I'd like to make it a 3-letter name, but I don't want to conflict ...
-1
votes
1answer
2k views

Check if the command exists in bash

I want to check if a given command exists in bash and I care only about the native commands of the bash and not the scripts written by the user. When I refer to native commands I mean all those ...
3
votes
2answers
791 views

is there any command like “wall” that runs a “command” in all terminals

as you know "wall" command sends a message to all terminals: wall message now my question is this: is there any command that can send a "command" to be run in all terminals? for example sending ...
3
votes
1answer
2k views

Make awk use bash with the system() command

Is there a way to make awk use bash instead of sh when running system commands using the system() call? I want to use some bash-specific features such as [[ ]] and < > string comparison operators: ...
7
votes
2answers
6k 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 ...
5
votes
3answers
721 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 ...
80
votes
6answers
7k 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?
1
vote
1answer
273 views

How to active tabs on windows by terminal? wmctrl doesn't have option available

I'd like improve a script of mine that uses firefox to perform tasks. I need activate a window and a tab with a specific name. For example, the window name could be Mozilla Firefox and the tab ...
3
votes
1answer
728 views

Searching a file & excluding lines with a specified string

I have a large log file that contains numerous lines of the same entry, lets call it "repeat-info". As an example here is what a portion of the log might look like: [Timestamp] repeat-info ...
19
votes
3answers
875 views

Which are the standard commands available in every Linux based distribution?

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: ...
1
vote
3answers
184 views

how to forbid a command without a permission

I intended to delete all the backup files in a directory, so I was going to type rm *~ in the terminal. Unfortunately, I hit the Enter before hitting the tilde and unhappy things happened. Although, ...
4
votes
2answers
3k views

How to execute one command on all files within a folder

Saying, I have this tree and I want to execute ruby on all scripts within the folder. How could I archive through one line of command. ./ ../ rb-script/ sample1.rb sample2.rb
2
votes
1answer
766 views

how to get out from the command iostat on unix?

I was installing a .iso 8,2 version in a vmware to learn unix., and i am stuck with iostat command, i run iostat 3 and is keep going to show me the results, but whem i put exit or q or q! to exit, he ...
4
votes
3answers
4k 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/'
4
votes
5answers
1k views

Execute string result from shell script as a set of shell commands

I create a string result from my shell script and i want to execute it as a shell command. For example file_a is: user1@gmail.com user2@gmail.com script: awk '{print "mail -s \"welcome\"", $1}' ...
2
votes
1answer
120 views

Is there a command that outputs a line-numbered file starting the numbering at a specific line?

cat -n file outputs file with line numbering, but how can I specify at which line to start the numbering? Is there a command that can do that? I've thought of perhaps splitting the process into a few ...
3
votes
3answers
3k 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
2answers
1k views

Ignoring files that find cannnot search or open?

I searched for big files using this command on HP Unix: find . -type f -size +100000000c -exec ls -lrt {} \; The result came out somthing like this: -rw-rw-rw- 1 qa1wrk32 test 169263642 ...
6
votes
4answers
2k views

In UNIX, how to find the most commonly used commands in history of unix?

In UNIX, how to find the most commonly used commands in history?