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

0
votes
2answers
33 views

What are the meanings of different Unix commands? [on hold]

I am running Ubuntu 14.04 on my machine. I am new to Linux and feeling lost when I see different command line commands (or what exactly are they called?) like sudo, apt-get, mkdir, -R, -n etc. while ...
1
vote
2answers
26 views

Replace text/string with new line

I have had a requirement where I need to move data to a new line based on a text: Input :61: 456 B66666 :61: 878 N78777 :61: 534533534 BNNN Output :61: 456 B66666 :61: 878 N78777 :61: 534533534 BNNN ...
0
votes
4answers
35 views

How to save in a variable the convert from decimal to binary without use an echo

I've been trying to save in a variable the value of the convert of a number from decimal to binary, like this: num1=10 echo "obase=2;$num1" | bc | tee -a register.txt but I don't want to show it ...
1
vote
1answer
34 views

Execute commands when specific user and ip login to ssh

How can I execute a few commands when a specific user with a specific IP logs on via ssh?
3
votes
2answers
78 views

How to use getopt in bash command line with only long options?

There is a getopt command in bash command line. getopt can used with short options (such as getopt -o axby "$@"), and can be used with both short and long options (such as getopt -o axby -l long-key ...
0
votes
0answers
20 views

My Ubuntu won't recognize the command ./configure [closed]

I have recently purchased a computer off of my sister that she wiped and loaded with Linux. Now that I have it, I have no idea what I'm doing and need some help. I have been trying to install Unity ...
-8
votes
2answers
45 views

How to create my arbitary output? [closed]

How can I write a shell script that give me following output: Today is: Thursday, November 05, 2014 The IP for localhost.localdomain is: 192.168.141.140
1
vote
1answer
70 views

Why is variable assignment preceding command ignored? [duplicate]

The bash 4.1 manpage states (emphasis added)... Simple Commands A simple command is a sequence of optional variable assignments followed by blank-separated words and redirections, and ...
0
votes
1answer
41 views

From Terminal, how would I copy a text file from the desktop into a USB?

I'm just trying to repeat command line basics.
-2
votes
1answer
90 views

Delete all mails from inbox using linux command prompt

How can I delete emails from an individual email account? e.g. how can I empty userxyz@mydomain.com? I know the following: /var/spool/mail/mydomain /var/mail/mydomain I have many inboxes some of ...
1
vote
1answer
21 views

What does the parenthesis mean in a command description like “mklost+found(8)” [duplicate]

When googling for linux commands, I often see a number in parenthesis like this: mklost+found(8) What does it mean? Is it a version number of the program, reference to some standard, or what?
0
votes
0answers
25 views

want to replace a file data from another file [duplicate]

I want to replace a file data from another file Suppose file1 have data written below and file2 have some data i want to store replace file1 data from file2 from starting word // +++ CUSTOMIZATION ...
1
vote
2answers
71 views

How to kill all processes for a given user that take longer then X time

When I list processes with ps auxf I often see some that are stuck and I need to manually kill them. How can I do it with one command? Example ps result: $ ps auxf USER PID %CPU %MEM VSZ ...
19
votes
4answers
1k views

The difference between -r and -R

It often happens that I want to apply an operation recursively. Some commands, such as grep, use a lowercase r to indicate recursion. For example grep -r foo . Other commands seem to prefer an ...
1
vote
3answers
73 views

What is the concept hidden behind the term “command”?

I have been using, studying and developing for Linux for quite a few years now, and over time, I have successfully convinced a few people to join the cause, and make the switch to Linux. However, ...
2
votes
1answer
41 views

Command to print few consecutive lines from middle of a file [duplicate]

For a file containing 20 lines, lines 6-10 can be printed using following command: head -10 filename | tail -5 Can this exactly same thing be done without using 'head' and 'tail' commands ?? ...
0
votes
2answers
44 views

execute command from txt file

I have file and in this file i have this lines: ssh root@server1.com ssh root@server2.com etc.... And i have script that i like to go on every server and execute the ls command on each of this ...
1
vote
0answers
33 views

Edit a command? [duplicate]

I'm using many basic commands of unix/linux. In Mac OS X Mavericks, I type cat for a file, but output was faulty. In example, content of the file named bar: foo bar Then: ...
2
votes
1answer
46 views

What is a command that will only show me the command syntax and options?

Is there a command which will just list all the options for a given command on one or two lines and not as long and words as man or info ?
9
votes
6answers
1k views

How do you remember command options? [closed]

I am curious to know what trick you use to remember options for various commands? Looking up man pages all the time is time consuming and not so cool!
0
votes
2answers
42 views

`cron` service and `at` command

Help to understand: is there any relation between cron and at command. Actually if I stop the cron services in SUSE by running following command: /etc/init.d/cron stop after above, if I run at ...
1
vote
3answers
155 views

What is $() in a command?

What is $() in Linux Shell Commands? For example: chmod 777 $(pwd)
1
vote
3answers
138 views

How to rename file using substring of the same file name [duplicate]

I want to rename my file with its substring.Because unfortunately renamed all the files in my server. Now I want to remove suffix( .gz) of all the files including files in subdirectories also. Below ...
4
votes
1answer
2k 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. ...
1
vote
0answers
55 views

alias Not able to execute source command

I am trying to define a following alias in my .aliases file. alias sett 'cleartool setview viewXYZ_!*; cd /path_dir1/dir2/; source ./env/script-name' I use it as sett myview on commnd prompt when I ...
3
votes
1answer
40 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 ...
1
vote
0answers
136 views

ssh from an unix server to a windows server (running Sysax) fails

We are doing a sFTP from an Unix server to a Windows server and also a ssh, from the Unix server to the Windows server, to execute a file present on the Windows server. These 2 steps worked well. ...
3
votes
1answer
23 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 ...
4
votes
1answer
49 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 ...
3
votes
4answers
204 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, ...
29
votes
5answers
766 views

How to save a command you entered without executing it? [duplicate]

Every Linux user has experienced this annoying thing: you begin typing a long and boring command, then realise you should have executed another one before. How to save the first one to execute it ...
0
votes
1answer
48 views

How to save mails in Unix? [closed]

I wanted to save mail in unix in some directory, as we do in outlook (files are saved with .msg extensions). Is there any workaround for doing this.
1
vote
1answer
65 views

Multiple MODULEPATH entries in .modulesbeginenv

I'm switching between paths/code projects. At each place I have different modules. To handle this there is a setup script that modifies what to use. This is handled with the tool 'module'. NOTE: ...
6
votes
1answer
260 views

What's the difference between “realpath” and “readlink -f”

I've read a lot about realpath command and how it has been deprecated with the readlink -f being now recommended. I have also seen in some places that the reason why realpath was introduced was for ...
8
votes
3answers
406 views

Vim: pasting lines line by line

Let's suppose I have a file containing: xxx yyy zzz and another file: kkk qqq ppp I want to obtain: xxxkkk yyyqqq zzzppp Is that possible in Vim with some command? (I've tried using VISUAL ...
3
votes
1answer
5k views

Does Linux allow executing the “rm -rf / ” command? [closed]

We all know that we have to use the -rf option of rm command carefully. What I wonder is does Linux allow executing this command: rm -rf /? If so, why? This command could have disastrous ...
7
votes
2answers
299 views

Change the order of executables started in bash

If I execute the test command in bash, test(evaluates conditional expression) built-in utility is started: $ type test test is a shell builtin $ type -a test test is a shell builtin test is ...
5
votes
1answer
395 views

What exactly are commands? How to identify? [duplicate]

I want to know what exactly are Linux commands? & how to identify and locate them? (Say Introduce the "commands") In other words what are different kind/type/category of commands? How to identify ...
6
votes
4answers
131 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 ...
2
votes
2answers
177 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
1answer
67 views

How to convert .doc to ODF with a command line?

I'd like to convert many Microsoft Word documents to ODF (the OO.org formata with a command line (because there are many of them). (I need them for reading afterwards on a device where reading OO.org ...
0
votes
0answers
840 views

Pbrun not allowing to execute commands

why do i get this when i execute pbrun. $ pbrun ls You are NOT allowed to use pbrun -h <remotehost> ls. Please try again without -h option. Host: xxxx Submithost: xxxx.abcd.xyz.com ...
3
votes
2answers
409 views

Redhat Linux: How to know my system configuration?

I am using Red Hat Enterprise Linux Server release 5.9 (Tikanga). For installation of any application, it is very important to know the system configuration, is it 32 bit or 64 bit system, Installed ...
5
votes
2answers
316 views

Get the actions for a command programmatically

Let's take the git example: $ git<TAB><TAB> git git-import-dscs git-shell git-buildpackage git-import-orig git-upload-archive git-dch git-pbuilder ...
1
vote
1answer
134 views

`tar` with `find` with removing original file extension

I want to create tb2 files from bunch of text files like this. tar cfj $(basename ./2014_04_09.txt .txt).tb2 $(basename ./2014_04_09.txt) With this command I can create a archive file 2014_04_09.tb2 ...
85
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 ...
-3
votes
1answer
44 views

In what directory can I find the list of terminal commands or the set of scripts that give each one its purpose/power?

Is it hidden or accessible? Also, can you create a new script and define a new command to execute system-wide by adding it to this directory and giving it the same privileges?
11
votes
7answers
2k views

What is the symbol *.* called?

What's the name for the *.* symbol and what is its significance?
1
vote
2answers
27 views

Install-on-Demand Wrapper Function for Executables

How do I make the following function work correctly # Install git on demand function git() { if ! type git &> /dev/null; then sudo $APT install git; fi git $*; } by making git $* ...
1
vote
1answer
99 views

How to start an application as GNOME would by command line?

How would I start an application (by launcher) the exact same way as GNOME would, in a command line interface? I want to set some environment variables. I know I can check the launcher file for the ...