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
30 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
143 views

What is $() in a command?

What is $() in Linux Shell Commands? For example: chmod 777 $(pwd)
1
vote
3answers
44 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 ...
2
votes
1answer
25 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 ...
4
votes
1answer
157 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
49 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
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 ...
1
vote
0answers
47 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
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 ...
4
votes
1answer
40 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
67 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, ...
28
votes
5answers
696 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
40 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
28 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: ...
5
votes
1answer
88 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
361 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 ...
0
votes
1answer
661 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
262 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
373 views

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

I want to know what exactly are Linux commands? & how to identify and locate them?
6
votes
4answers
124 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
109 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: ...
1
vote
1answer
50 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
308 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 ...
4
votes
2answers
268 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
281 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
94 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 ...
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 ...
-3
votes
1answer
40 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
21 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
54 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 ...
0
votes
1answer
35 views

Is there any command to list all related files and folders to specified file in macosx?

I have many ctags in my macosx. When doing which ctags, it gave me /usr/bin/ctags. But I also want to know where is all related folders and files to this /usr/bin/ctags Any useful command?
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}$" | ...
15
votes
2answers
496 views

Is there something like `time` that also records I/O and CPU?

I can pretty quickly monitor the running time of a process with time: x@y ~ $ time foo real 0m14.299s user 0m4.770s sys 0m0.440s Is there a way I can get the same data for ...
1
vote
1answer
32 views

Escaping dash in `dch` call

I'm using dch to modify the changelog for a debian package that is being built using some bash script. The messages for changelog are taken from some data source and are just passed to dch --append. ...
1
vote
2answers
154 views

How to get SCP execution time in milliseconds?

I have a script in which i am reading source and destination IP address from a csv file and recording the time in milliseconds it is taking to copy the file from source to destination (using scp). ...
0
votes
3answers
87 views

Remove extra line break from a variable

I am an absolute newbie to the *ix ,so if my question is dumb please bear with me. I am writing a script where I am trying to export some variable , and after exporting my variable when I am printing, ...
21
votes
4answers
1k views

Is the shell permitted to optimize out useless terminating commands?

If a shell is asked to perform a probably useless (or partially useless) command known to terminate, such as cat hugeregularfile.txt > /dev/null, can it skip that command's execution (or execute a ...
4
votes
2answers
356 views

Command completion does not complete the files in the current directory

Something is wrong with my tab completion. Let's say I do this: cd test // works fine, go into test directory ls // works fine, displays all of the files Let's assume I have the following files: ...
20
votes
2answers
632 views

How do I move all files output from a command?

I have this grep command to find files without the word Attachments in them. grep -L -- Attachments * I want to move all the files that are output from that command. How do I do that in bash? Do I ...
-1
votes
3answers
57 views

How to know in which distribution is present one command [closed]

How can I know the Linux distribution of the command? For example, lscpu command Is there any place with a matrix (distribution, commands)?
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 ...
2
votes
2answers
445 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
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 ...
1
vote
1answer
118 views

Command to Download Source Files in FreeBSD

In most Linux distros there is a command sometimes the same one used to install or build (compile) packages with extra switch; which just download the source files instead of building or installing ...
2
votes
1answer
334 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 ...
0
votes
0answers
49 views

No such process error with launch ctl start. Mac OSX 10.9

The goal is to set the machine's network name with the IP address of this machine. I have created a plist file and put it into /library/launchagents/. For debugging reasons, I used the commandlaunctl ...
3
votes
3answers
306 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 ...
0
votes
2answers
142 views

How do I get the list of exit codes (and/or return codes) and meaning for a command/utility?

Is there a way I can do what stated in the title from the terminal commands, or will I have to look into the codes?
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?