Tagged Questions

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

1
vote
1answer
167 views

What does - mean with association to Linux files and directories [duplicate]

Possible Duplicate: What does “--” (double-dash) mean? What does '--' (two dashes) mean with association to Linux files and directories. I've found something else but not too sure if it is ...
3
votes
0answers
69 views

gnu screen: automatic session on split

Inactive region appears after 'split' command in gnu screen now. You must go to the new region and type :screen. Only after that shell session appears in this region. Is it possible to make new ...
3
votes
2answers
2k views

Difference of folders and files

I have two folders which have different folders inside. Those folders also contains different files. I am looking for the command that would give me the difference between those two parent folders. ...
1
vote
2answers
5k views

tar: Unexpected EOF in archive

I am trying extract .tar.gz file it but with no luck gzip: stdin: unexpected end of file tar: Unexpected EOF in archive tar: Unexpected EOF in archive tar: Error is not recoverable: exiting now the ...
5
votes
3answers
3k views

Why doesn't ln -s tell that it fails when creating a symlink to an existing symlinked directory?

When running (on linux different ubuntu variations): >ln -s dir_1 symlink_dir >ln -s dir_2 symlink_dir It fails without telling that it fails. But if you do the same thing on a file instead ...
0
votes
1answer
281 views

Command not found

I am trying to stop a syslog using chkconfig but bash says that command is not available. But when I do man chkconfig it opens man page. This is the command i'm trying to execute. ...
5
votes
3answers
1k views

Test command in unix doesn't print an output

When I type this in the terminal test 4 -lt 6 I don't get any output. Why not? I need that 0 or 1
5
votes
2answers
2k views

What's the difference between “dir” and “ls”?

I have compared the man pages of dir and ls and they seem to be exactly the same. Both are part of GNU coreutils and "list directory contents". The only difference I've seen so far is that dir ...
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 ...
11
votes
5answers
30k views

How to move all files and folders via mv command

How can I move all files and folders from one directory to another via mv command?
4
votes
1answer
931 views

Command & binary exists but cannot be executed

I transfered /etc/* files from one Linux server to another and now I have a strange error. Both are Debian Squeeze. When I run a command, e.g. ssh, I get an error: bash: /usr/bin/ssh: No such file ...
2
votes
1answer
435 views

Computer speed in flops

Nowdays, The speed of supercomputers are measured in Flops. Is there any linux command or tool that can calculate or gives the speed of a processor in Flops. If not, than how do we measure it.
1
vote
2answers
1k views

Where to find the source code for ps?

I want to check out the source code for commands such as ps. It seems to be impossible to search LXR (linux.no) for "ps". Where do I find it?
4
votes
3answers
3k views

Split command output by linebreak?

I have a command returning multiple lines. For further processing I need to process each single line of those lines. My current code works by modifying the IFS (Internal Field Separator): ...
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?
4
votes
4answers
543 views

Is there a practical use for the GNU factor command?

Looking through the GNU Coreutils, I spotted the factor command, that I had never noticed before. Reading the man page: Print the prime factors of each specified integer NUMBER. If none are ...
12
votes
2answers
7k 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 ...
5
votes
1answer
864 views

Git auto-complete

I am using Git as many of you do. Also, I don't use any GUI for that — just CLI. So I was wondering: are there any way to make Git commands (git status, git checkout etc.) complete themselves when ...
3
votes
1answer
886 views

How to check will my computer is going to reboot(or shutting down)?

When I send a reboot command(or shutdown) command to a Linux machine does it keeps that messages at somewhere and can I query it. I.e. I will send a reboot command and after that I will run another ...
0
votes
1answer
90 views

Why does this compound command report errors when copying directories? [duplicate]

Possible Duplicate: 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 ...
0
votes
2answers
198 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 ...
1
vote
3answers
272 views

Print folders names character count

I am trying to use find . -type d -print | wc -m where -m or --chars would print the character counts of the folder names. Take following screen shot as example, the character count for tempFolder + ...
6
votes
3answers
513 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
747 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
1k 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
5k 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
634 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 ...
77
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?
1
vote
1answer
265 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
621 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
835 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
181 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, ...
3
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
701 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 ...
3
votes
3answers
3k 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
117 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?