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

4
votes
1answer
1k views

What is the use of literal command in ftp?

Browsing through FTP help (i.e. ftp> ?), showed me a command name literal, description of which is ftp> ? literal literal Send arbitrary ftp command I tried to do some trial and ...
4
votes
1answer
147 views

ifconfig command not found

I've just installed CentOS7 as a virtual machine on my mac (osx10.9.3 + virtualbox) .Running ifconfig returns command not found. Also running sudo /sbin/ifconfig returns commmand not found. I am root. ...
4
votes
3answers
2k 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): ...
4
votes
1answer
39 views

How to update 'command cache' after change of soft links?

I have changed multiple soft links on my system with ln -f -s. When I view the link with ls -l, I see they point to the right target. However, when I try to run the command, it still tries to use the ...
4
votes
1answer
115 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 ...
4
votes
3answers
510 views

How to find a file with specific permission of a specific user?

How do I get a list of all the files which permission is "read and write" for a specific user. For example, when I go on the desktop of my mac, then right click on file "A", then "get info", then on ...
4
votes
1answer
498 views

What is the difference between exiting a process via Ctrl+C vs issuing a kill -9 command?

I know I can kill any process with kill -9 command . But sometimes i see that even if I have terminated a program with CTRL+C , the process doesn't get killed . So I want to know the difference ...
4
votes
1answer
163 views

What does the command “$()” do in UNIX?

What does the command $() do in UNIX? Could someone explain what is the significance of $ in the below examples; $(echo var=10) and eval $(echo var=10)
4
votes
1answer
799 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 ...
3
votes
5answers
195 views

find which system is transmitting through a particular port

I am using command nc -lu <port no.> to find on given port any data is receiving or not. I am getting data if there is transmission going on (but don't know from where!). Is there any way that ...
3
votes
3answers
300 views

Shortening build command

Is there any way I can shorten this openCV build command? g++ file.cpp -o newFileName `pkg-config --cflags --libs opencv` I tried adding: -o newFileName `pkg-config --cflags --libs opencv` to an ...
3
votes
2answers
433 views

print command instead of echo in linux

I simply can print a message in terminal using linux echo command. prayag@prayag$ echo "prayag works on JVM" prayag works on JVM Can I have the same output with print command. I actually went ...
3
votes
2answers
2k 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
3
votes
3answers
66 views

unix command to print till 3rd occurence of “/” in each line

I have one file contains data as follows... /tutordashboard/manageTutorLogInStatus/?ua=TQ-AUTOCLOSE-REENTER&filterId=089089087087080&dt=1325757272 ...
3
votes
1answer
519 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 ...
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 ...
3
votes
4answers
65 views

Generate random numbers in specific range

After googling a bit I couldn't find a simple way to generate with a shell command a random number included in a specific range, between a minimum and a maximum. I read about /dev/random, ...
3
votes
2answers
304 views

what is the meaning of this sed command?

sed -e 's/72;/72, next_val = 0x11111111;/;/@/{h;s/test/next/g;x;G}' fmt_vuln.c > fmt_vuln2.c could you tell me about what is the meaning of ;/@/{h;s/test/next/g;x;G}?
3
votes
2answers
271 views

Memory usage command with syntax similar to the time command

What command shows the memory usage of a program, i am looking for a command that is simple to use and has similar syntax to the time command. I am trying to find the memory usage of a md5 hashing ...
3
votes
2answers
292 views

Please explain the -f option in pgrep

man pgrep says the following about -f option: -f The pattern is normally only matched against the process name. When -f is set, the full command line is used. What does it ...
3
votes
2answers
195 views

Make copies of a single directory to multiple directories with different names

I'm trying to replicate a single directory (with sub-directories) to a bunch of new directories based on a list. For example I can: mkdir Fred Barney Thelma Louise Foo Bar How would I copy a premade ...
3
votes
1answer
36 views

Switching users without the - symbol

I had to switch to a different user earlier for something that I was working on. I have originally done: su support While I was successfully able to switch to support, I found I was unable to make ...
3
votes
3answers
435 views

Correctly parse arguments in script behaving like a shell called through SSH

I have a server with a very limited used whom I want to be able to run two very specific (and custom) instructions through SSH. In order to do that, I have set the shell for that limited user to be a ...
3
votes
1answer
109 views

command not found handle doesn't work for url

I'm trying to setup the command_not_found_handle for URL links, %> command_not_found_handle() { echo "OK"; } %> aaaaa OK %> http://www.google.com bash: http://www.google.com: No such file or ...
3
votes
2answers
680 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: ...
3
votes
1answer
16 views

How to execute as the logged-in user in a sudo script (OSX)?

Is there a way to switch contexts like that? The script in my specific case is an installer postinstall script, which requires sudo privileges only for some of the tasks and requires the logged-in ...
3
votes
1answer
105 views

clear full-screen in script and get the previous prompts after exiting script

Today I was using glance tool in my office to monitor CPU utilization.When I run glance from terminal ,the command clears the screen and after all the work when I quit back to the terminal,the ...
3
votes
1answer
2k views

How to see the total progress while copying the files

We know that if we give --progress parameter to rsync it will show the progress of files copied. But issue is that is shows the progress for each single file not total or overall progress. So how to ...
3
votes
1answer
774 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 ...
3
votes
2answers
1k 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. ...
3
votes
1answer
36 views

Printing short latex snippets

Is there a way to quickly (render and) print short latex snippets like single equations? Something similar to echo "Some text" | lpr like make-latex-image "$\frac{some}{equation}$" | ...
3
votes
0answers
65 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 ...
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/'
2
votes
1answer
631 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 ...
2
votes
2answers
944 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 ...
2
votes
3answers
487 views

what is “play” command/package available by default in Linux Mint and how to remove it

I'm trying install play framework on Linux Mint and setup its variable: export PATH=$PATH:/relativePath/to/play But command can't run because it's being overlapped by another play command which was ...
2
votes
2answers
103 views

Tool for viewing top N items in stream

I'm looking for an existing Linux command-line tools that can accomplish the following: Consider there is an input stream /dev/inputstream which spews an infinite stream of data that looks like this: ...
2
votes
2answers
3k views

How to list groups with gid in redhat?

I first listed the groups using : groups I added group using groupadd -g 300 oinstall groupadd –g 500 dba and then when I do groups root bin daemon sys adm disk wheel sfcb I am unable to ...
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 ...
2
votes
4answers
490 views

What are commands to find shell keywords, built in functions and user defined functions?

I was discussing with my friend on how the commands are parsed in the shell, and he told me that bash searches the command in following order List of aliases List of shell keywords List of ...
2
votes
2answers
420 views

How can I restore file timestamps of video recordings using the embedded metadata?

I'm looking for a command that will read the metadata of a ‘*.mp4’ file and touch the file's timestamp with the creation time of the video. The command should be read-only with respect to the file ...
2
votes
1answer
372 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.
2
votes
1answer
313 views

How can I pipe commands to any terminal?

I often use more than one terminal (or terminal emulator) at a time; and while in X I can copy-paste commands, besides not being very practical, it obviously does not work on the real TTY. The first ...
2
votes
1answer
76 views

How does one determine the amount of space allocated to their command line?

How would one go about determining the amount of space allocated to their system for command lines. Is there anything else I need to be concerned with?
2
votes
1answer
114 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 ...
2
votes
1answer
17 views

Retrieve system commands without reading sources

Sometimes I wonder how Linux programs achieve certain results knowing that they internally use system calls (system() or exec() in C programs). Given a working binary I wonder if it is possible to ...
2
votes
1answer
350 views

Please explain the output from the jobs command

When I ran jobs command I see the following output : [1] - Suspended ./startWebLogic.sh [2] + Suspended (signal) top What does -/+ indicate in the second column ? ...
2
votes
1answer
23 views

PBS equivalent of 'top' command: avoid running 'qstat' repeatedly

When I run several jobs on a head node, I like to monitor the progress using the command top. However, when I'm using PBS to run several jobs on a cluster, top will of course not show these jobs, and ...
2
votes
2answers
65 views

netstat command doesnt work anymore on the new dedicated server

I was using the following command on my previous dedicated server with the same version of the FreeBSD installation: # uname -a FreeBSD 9.2-RELEASE FreeBSD 9.2-RELEASE #0 r255898: Thu Sep 26 22:50:31 ...