The command-line is the interactive interface to your shell.

learn more… | top users | synonyms (1)

1
vote
1answer
14 views

How can I change the IP and gateway addresses permanently?

I recently installed Linux Ubuntu 14.04 to my computer. To enable internet connection I needed to change my IP and Gateway address. I did the following as a root user # ifconfig eth0 "my ip address ...
5
votes
1answer
44 views

Terminal does not accept pasted or typed lines of more than 1024 characters

When I enter text on stdin in an OS X Terminal, a single line is limited to 1024 characters. For example, cat > /dev/null beeps after I type (or paste) a line longer than this, and refuses to ...
-2
votes
3answers
39 views

Can an argument be passed through the “alias” command? [duplicate]

I want to know if i can pass an argument with an alias command. for example: alias d="dmesg|grep -iw usb|tail -5" Now d will print the last 5 lines. if i want to use d to print a different number ...
0
votes
1answer
26 views

Linux driver privileges

I've loaded a custom driver to linux via mknod. However, now any programs I write to use it need to be run using sudo, which is difficult to do when I'm using an IDE. Is there any way to adjust the ...
5
votes
5answers
102 views

Run `grep` excluding a file in a specific path

I want to exclude the file ./test/main.cpp from my search. Here's what I'm seeing: $ grep -r pattern --exclude=./test/main.cpp ./test/main.cpp:pattern ./lib/main.cpp:pattern ./src/main.cpp:pattern ...
0
votes
0answers
5 views

Change default XFCE backdrop for all users via cli?

So my situation is that I can change the relevant property for a user if I have Xorg running by xfconf-query, which is the normal way as I understand to do this, but I cannot use this command normally ...
2
votes
3answers
35 views

Manipulate multiple files by inode

I have a large number of files that contain backslashes \ that I would like to manipulate, but whenever I try something like: $ ls -li 2036553851 -rw-rw-r-- 1 user user 6757 May 20 00:10 ...
3
votes
4answers
83 views

Run multiple commands and kill them as one in bash

I want to run multiple commands (processes) on a single shell. All of them have own continuous output and don't stop. Running them in the background breaks Ctrl-C. I would like to run them as a single ...
0
votes
1answer
23 views

How does “command < filename.txt” look when passing filename into a command

I've got a scenario where I have command < filename.txt so I can pass the contents of filename.txt and use it in command. But say I want to take the contents out of the file and just use them in ...
0
votes
1answer
15 views

tmux starts in strange context (window name: 0:python3) and no prompt? [on hold]

Behavior: tmux new -s yields the following screen: Note: no prompt window named 0:python3 If I type ^C I get the following which is what I expected from the beginning: Ideas? Admittedly ...
0
votes
2answers
42 views

Delete customers domain extension only (in .csv file)

I have a list of my customers emails and want to remove some that end in .br for example. I would normally do the following command: sed -i '/.br/d' customers.csv But that would also delete a ...
0
votes
0answers
36 views

use result of last line in bash [duplicate]

-> which vim /home/spo/Home/Platform/Linux/Module/Vim/Bin/vim su spo $RESULT_OF_LAST_CMD /etc/fstab What is the bash variable that holds the last commands result , like google chrome terminal . ...
0
votes
0answers
44 views

Shell script to send alert if mount point exceeds 75% [duplicate]

How to write shell script to send an alert if any file-system on server exceeds 75%, in one email notification instead of receiving separate alert email notification for each file-system. I am ...
3
votes
1answer
56 views

lshw shows a different amount of RAM than the 'free' command. Missing RAM? [closed]

Title says it all! uname -a: Linux servername 3.2.0-4-amd64 #1 SMP Debian 3.2.65-1+deb7u2 x86_64 GNU/Linux lshw output: *-firmware description: BIOS vendor: Dell Computer Corporation ...
0
votes
3answers
67 views

Is there something like “common Linux commands”? [duplicate]

I come from the windows world trying to switch to Linux. Sorry for the naïve question but is there something like "common Linux commands"? For example in Windows, the command line is pretty limited, ...
3
votes
1answer
47 views

Closing a GUI window from the command line

I often run scripts to transform a CSV file which I then preview in LibreOffice. I often open the CSV with xdg-open file.csv. However, if I run that command when the file is already open, ...
0
votes
2answers
51 views

Files greater than 1 GB and older than 6 months

I want to find files which are greater than 1 GB and older than 6 months in entire server. How to write a command for this?
-1
votes
0answers
43 views

Centos 7.0 update command not working

I have just installed CentOS 7 on my PC. After install completed I tried to update CentOS using the yum update command: Downloading packages: No Presto metadata available for base warning: ...
2
votes
1answer
28 views

Can not access my external hard drive.

I am fairly new to Linux and have been trying to move some files around with terminal on my external hard drive but I can't seem to get it to work. I am using a generic external hard drive with a ext4 ...
4
votes
3answers
46 views

Why can't I open a shell from a pipelined process?

I've condensed my problem into the following code: #include <stdio.h> int main(){ char buffer[256]; printf("Enter input: "); scanf("%s", buffer); system("/bin/sh"); ...
-1
votes
0answers
21 views

Search for a file on a domain in the command line

I'm running a Direwolf20 minecraft server, which doesn't auto-update and I want to write a script to do so, but I won't know the new server version at the time of the update. Is there any way I can ...
-5
votes
2answers
55 views

PDF: Using Terminal [closed]

I tried creating a PDF file using terminal . I wrote "vi New.pdf". It created the file. Now that when i trying to double click and open it . It said something like :- The file "New.pdf" could not ...
5
votes
1answer
86 views

prevent multi-line paste in bash

I often use ctrl+c to copy text from some gui application and then paste it into my terminal emulator (terminator), using right-mouse-click-menu and paste. Sometimes I forget that the clipboard ...
3
votes
4answers
46 views

Find the last occurence of a string in a given filetype in all subdirectories

I have multiple sub-directories each with different depths. I need to search for the last occurrence of a string in a specific filetype (say *.out). How can I accomplish this? I have tried: grep -r ...
1
vote
0answers
16 views

tool in terminal like helm-occur/helm-swoop for terminal?

I don't know whether this is the right place to post this question, but if you are not an Emacs user, I'll explain the basic usage of helm-occur/helm-swoop. I like helm-occur/helm-swoop for Emacs ...
1
vote
3answers
61 views

Checking pop mail account using terminal

Is there any command in unix to check a pop3 account using terminal? I mean, type the server/username/password of a pop3 account and see if the username/password is correct?
0
votes
1answer
90 views

How to prevent expansion

My script parameters on the mask and consist parameters for the find tool: $mopt=false case $1 in ... -m|--mask-file) if $mopt; then or="-o" fi ...
5
votes
3answers
343 views

command-line tool for a single download of a torrent (like wget or curl)

I'm interested in a single command that would download the contents of a torrent (and perhaps participate as a seed following the download, until I stop it). Usually, there is a torrent-client daemon ...
1
vote
2answers
64 views

Spawn multiple processes with a single command

Is there a way to create say 10 instances of a process (for example yes) with a single command? $instantiate 10 yes
1
vote
1answer
37 views

linux commandline can connect but webserver (or php) can't connect

We can connect to a specific url with linux (centos 6) commandline (curl, wget,...) But we can't connect to it by webserver (apache) or php. I did 'setenforce 0' command, after that webserver and ...
1
vote
1answer
41 views

Host linux distro without GUI?

I saw this video on Youtube: Run Kali Linux on Android The phone uses the app: Linux deploy, which uses the phone to host the distro, but there's is no GUI. The only way to connect to Kali, is by ...
1
vote
1answer
34 views

process id and command

I want to write the process id and command of all processes with some name and from some user (for example root and init). What should I do? ps -f -u root -C init or ps -f -U root -C init ...
4
votes
2answers
55 views

How to kill a bunch of jobs based on ps output?

Here is output from ps: $ ps aux | grep blob ubuntu 4286 0.0 0.1 34748 9592 ? S Jan14 0:00 /usr/bin/python /usr/local/bin/pynt start_blob_reader ubuntu 4287 0.0 0.1 34748 ...
1
vote
1answer
51 views

Using single command to find NIC speed

Do you know a single line command to capture NIC speed of the primary interface of the server. For example, for eth0 Get hostname using uname -n Get its IP using nslookup `uname -n` Search for the ...
1
vote
2answers
59 views

Command line interface Vs GUI [closed]

This may be a rather simple question but here goes. I am thinking of learning to use a CLI as I have been told it is more efficient for a technician to use than a GUI. Could someone please outline ...
0
votes
2answers
43 views

How to grep from command line for theses multiple strings?

I need to run a command to grep one of these strings from command line as web host disabled account to run website from browser until virus files are removed and I managed to collect few strings that ...
0
votes
1answer
31 views

Linux Mint 17.1: startx doesn't work and startxfce4 requires root

On Linux Mint 17.1 with XFCE installed, I removed MDM to enable booting in text mode. Now, when I try to run startx, it open the xfce4-panels on a grey background but gets stuck there with the panels ...
6
votes
2answers
124 views

Identify alias for the command typed

Is there any shell/shellscript which identifies that there is already an alias for the command I have typed on the command line. Eg On shell I type git checkout master Shell prints "You can use ...
0
votes
1answer
55 views

Sending a HTML file (with images) as email body using command line

This seems like a basic question and there are variations of it. I have a ONE-COLUMN html file (let us call it status.html). I would like to send this file which has a few images as the BODY of an ...
3
votes
2answers
158 views

kill: SIGSTOP: invalid signal specification error in bash script

When I use kill on command line it works. kill -SIGSTOP 1234 But if I use in bash script file I get this error: kill: SIGSTOP: invalid signal specification sh file is #!/bin/sh kill -SIGSTOP ...
1
vote
1answer
35 views

How to check if allocated memory was freed?

Does anyone know which command I need to enter on the terminal, so I can check whether all allocated memory was successfully freed?
8
votes
3answers
515 views

How do I compress files in-place?

I have a machine with 90% hard-disk usage. I want to compress its 500+ log files into a smaller new file. However, the hard disk is too small to keep both the original files and the compressed ones. ...
3
votes
7answers
121 views

find files based on name and moving them with renaming simultaneously

Consider I've directories named according to years and containing pdf files according to subject-code. ls output is: $ ls -l total 32 drwxrwxrwx 1 root root 4096 Apr 8 08:52 May-June-2011 ...
3
votes
1answer
153 views

prevent a command from sending both stdout & stderr to any terminal or file [duplicate]

I would like to prevent my program from sending stdout and stderr to any terminals, files or devices. For this, I have three command crossing my mind, but I cannot distinguish their differences. Could ...
-2
votes
3answers
54 views

Command to print users that don't have /sbin/nologin as a shell

Given the /etc/passwd file, what is the command to print only the login names of users that do not have /sbin/nologin as a shell? Also, in my /etc directory, what can I use as a command to count the ...
0
votes
0answers
26 views

Scientific linux GUI Doesn't start

I am a new user of Scientific Linux 6. I am working on a project started by others and unfortunately the GUI stopped working. I need to find out how to troubleshoot the GUI to solve the problem. What ...
3
votes
1answer
38 views

using shortcuts to move in bash command line [duplicate]

When I use Ctrl+Left_arrow or Ctrl+Right_arrow in bash, I move backward a "word" and forward a "word" respectively. I belive, this is defined in /etc/inputrc # mappings for Ctrl-left-arrow and ...
1
vote
0answers
22 views

How to get stdout of process? [duplicate]

I started a process from the command line, but the window server died. However I see the process I started is still running. Is it possible to connect a terminal to the process to see its output? ...
3
votes
0answers
88 views

How do I permanently change the console TTY font type so it holds after reboot?

I'm running Ubuntu 15.04 64-bit Desktop Edition (A Debian based Linux). I used sudo dpkg-reconfigure console-setup from the command line to change the default console font type to Terminus. ...
1
vote
1answer
52 views

Python now thinks arguments are files: Broken emerge, pip, livestreamer and most tools using Python

For these commands (in both bash and fish): sudo emerge eix emerge eix I get this error: usage: emerge [-h] [--version] [input [input ...]] emerge: error: argument input: can't open 'eix': [Errno ...