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
0answers
21 views

Is it logical to give root execution to some commands executed by a normal user? [on hold]

Given a C/C++ program that uses some system calls or commands, say for example sockets. In this question the solution gives root access to a normal user to run a specific one executable, which means ...
1
vote
0answers
36 views

Limit transfer speed rate by Iptables Rule

I have D-Link Router DSL-2730U that support iptables version 1.4.0 and i want to know if that possible that i can limit a PC transfer speed rate (upload & download) by PC MAC Address using ...
0
votes
1answer
41 views

linux + top command

I run the top command on my linux machine and I see that vim command take like 99.5% CPU PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND ...
-2
votes
0answers
16 views

I want to open a window that has to run a command automatically and should not close and should take next commands [duplicate]

Am trying to open a window from command "xterm -e "" &" but the window is closing after the command execution, after that i tried with "xterm -hold -e "" &", this time window is not getting ...
1
vote
3answers
78 views

Execute command in another terminal and closing it without killing command

For closing terminal without killing script/command we use & operator at last while calling command. Like: gedit & Here I used gedit as an example command Same thing I want to do on ...
1
vote
1answer
17 views

why jobs doesn't list commands from script

I have a script that runs some programs in the background, but after running it, they are not listed by the command 'jobs'. Why is this? (./m_prog -t m_prog1 m_config) & (./m_prog -t m_prog2 ...
1
vote
1answer
58 views

What does this `xhost …` command do?

Please help me understand this line of command: xhost +SI:localuser:lightdm in reference to the answer in this post and also suggest if there's a better way and why that's needed. I couldn't make ...
2
votes
0answers
54 views

fork and wait - Unix v6 [migrated]

Here is the last part I do not understand in the source code of old unix v6 command if. Source: http://v6shell.org/history/if.c, with Syntax-Highlighting: http://pastebin.com/bj0Hvfrw if(eq(a, "{")) ...
0
votes
1answer
10 views

Extract audio from video in Thunar custom actions

Thunar custom actions can be used to convert media files by adding a simple command like avconv -i %f %f.mp3 I would like a command to extract aac sound from mp4 and flv files with a Thunar custom ...
0
votes
1answer
41 views

Command not working anymore in Thunar custom actions

I used to create a Thunar custom action as presented here in order to extract audio without transcoding from selected (multiple) video files . The command to be added in Thunar custom actions list ...
16
votes
0answers
759 views

“/usr/bin/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx”;? [migrated]

I found this line in the if.c of unix version 6. ncom = "/usr/bin/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"; Why are there so many x's? And why would you set this?
1
vote
1answer
61 views

How to permanently enable scl CentOS 6.4?

I installed a newer version of devtoolset (1.1) and was wondering how I would go about permanently setting these to be default. Right now, when I ssh into my server running CentOS, I have to run this ...
-4
votes
1answer
37 views

What is “jobs” commmand in Redhat Linux [closed]

What is jobs command in Linux and how to use it? Please give some example.
0
votes
0answers
22 views

Is there a large performance difference between find and find2perl

Is there a performance difference between find and find2perl? I work for a hosting company and I was told that our admins prefer us to use find2perl over find. Supposedly this is because find is ...
1
vote
2answers
48 views

Read Command : How to verify user has typed something

I am a beginner in Bash so please bear with me. I'm trying to create an if else statement to verify that the user has entered something. If they have it should run through the commands, and if not i ...
5
votes
2answers
52 views

Merging/Combining 2 text files according to numeric field

I have 2 text files file_1: 14595|Age 35|Salary xx|Position ax|2013|Info 1|Info 2|Info 3|Info 4|Info 5 14649|Age 30|Salary xx|Position az|2015|Info 1|Info 2|Info 3|Info 4|Info 5 file_2: ...
0
votes
1answer
22 views

Linux bash commands in android 4.1.2?

Is there a way to run linux bash commands in android (particularly 4.1.2 rooted or not rooted)? Will it void the warranty from phone manufacturers?
1
vote
3answers
84 views

What does “>” do vs “>>”? [duplicate]

I am currently doing preparation for my GCSE computing controlled assessment on Linux. I type ls > list and ls >> list into the command line, but it does not do anything. I have googled it ...
1
vote
2answers
72 views

The command 'cp' can only used on block device?

According to my last question I think we can't use 'cp' to copy file to the tape device or device like '/dev/lp0'.But I still don't understand why. To make this question simple enough,just tell me if ...
1
vote
1answer
235 views

find - exec rm vs -delete

I'm trying to understand the difference between these two commands: sudo find / -name .DS_Store -delete and sudo find / -name ".DS_Store" -exec rm {} \; I noticed that the execmethod is ...
0
votes
1answer
30 views

What is the command to check what version of Java ME I have installed?

I have Debian 6 installed on a device and want to check what version of Java ME I have installed. I tried java -version, but I get -sh: java: not found. What command should I use?
0
votes
0answers
28 views

How do I force a command to be run on local login?

I was wondering how do I force a command on login of a linux system? (debian 7). This is for a 2FA authentication command. I am asking for a local login.. not ssh.
1
vote
1answer
70 views

Get two values from command output in a bash script

I have a bashscript, which executes a command and calculates a pair of values, which output can look like this. a,b (10.0000000000, 10.0000000000) -> volt (2088133.7088034691, -222653.3238934391) ...
2
votes
1answer
64 views

Convert all non-JPG images to JPGs

What command can I use to convert all images in a folder which are not JPGs (PNG and BMP primarily) to JPG? I'd also like the conversion quality to be 100%. And I'd like the converted images to ...
26
votes
20answers
6k views

How do I print pi (3.14159)? [closed]

What command could print pi for me? I want to specify how many digits it prints, I couldn't find anything online. I just want to be able to print pi.
2
votes
2answers
33 views

Is there a `--paranoid` type flag for common, potentially irreversible commands?

I'm not aware of any standard flag that is implemented. There are some git commands that let you specify a -n parameter that will show you what the command is going to do, but doesn't actually do it. ...
1
vote
1answer
31 views

Checking permission for files

Is there any way to check/find files and directories that only I created and check their permission?
-2
votes
1answer
58 views

Sorting by size

When I run ls | sort -S I get sort : option requires an argument -- ´S´ Why I cant sort the list of my files with the sort option by size? I know that I can use only the ls command alone. ...
1
vote
3answers
34 views

Command that passes its input through to output AND performs command?

I'm trying to use the quote program to make a little shell script that'll keep updating the stock prices every second. quote has to access the Internet and therefore has a small delay when it runs. I ...
1
vote
1answer
35 views

What is the name of the app displaying custom text in fullscreen size?

I have seen years ago a very handy application: the command displayed it's first argument enlarged to fit the whole screen. For example... thiscommand AA ...then you could see two very big A ...
2
votes
2answers
87 views

What filesystem mount point am I currently working on?

I would like to know in what filesystem mount point I am currently on, similarly to using pwd to know what directory I am in. I know you can use df . (or df $(pwd) or many variants), but I find it ...
1
vote
2answers
65 views

Find average CPU, vMem, sMem usage on 1, 5, and 15min

I am trying to find at time T the average CPU usage on 1, 5, and 15min, just like what you get from /proc/loadavg Same thing for virtual memory, and swap memory. I would be fine with a python ...
8
votes
2answers
448 views

Finding a file type assuming wrong extension

I have an image archive I keep up. Sometimes, the sites I pull them from reformat the file while keeping the extension the same, most often making PNG images into JPG's that are still named ".png". ...
0
votes
2answers
191 views

What are the meanings of different Unix commands? [closed]

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
59 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
61 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
41 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
226 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 ...
-8
votes
2answers
52 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
127 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
59 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
296 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
29 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
26 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
93 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
86 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
64 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
57 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: ...