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

learn more… | top users | synonyms (1)

2
votes
2answers
68 views

Equation solver for the shell?

Is there an equation solver for the shell? For example, I enter input 1000=x^(1.02) and the shell solves for x.
1
vote
1answer
42 views

Can't run multiple files with nohup

This is what which is happening [4]+ Stopped sudo nohup exec php socket_axd.php adnan@vm085:~/server/axdchat/Server$ sudo nohup exec php socket_axd.php & [5] 2312 ...
4
votes
1answer
82 views

Executing commands in an elevated bash process by writing to the standard input of its parent script process

I have a simple bash script bash.sh that starts another bash instance using pkexec. #!/bin/bash bash -c 'pkexec bash' When executed this shows a prompt for the user to enter their password. The ...
4
votes
1answer
159 views

If I'm logged in as root, how do I restart mysql or apache with options?

I know the commands to restart/stop/start, but when I try to pass options it doesn't seem to work! CENTOS 6, MySQL 5.14 service mysql restart service httpd restart Then I tried this: ...
0
votes
3answers
12k views

Regular Expression for finding double characters in Bash

I am looking for a regular expression that finds all occurences of double characters in a text, a listing, etc. on the command line (Bash). Main Question: Is there a simple way to look for sequences ...
1
vote
1answer
17 views

How can I get a help message for zsh builtin's?

If I want to get a brief usage message for a bash builtin, I can use help <builtin> at a command prompt, e.g. $ help export export: export [-fn] [name[=value] ...] or export -p Set export ...
0
votes
2answers
2k views

Sending files over Samba with command line

I was wondering if there is a way to use Samba to send items to a client machine via the command line (I need to send the files from the Samba server). I know I could always use scp but first I was ...
1
vote
1answer
21 views

convert update-rc.d command into chkconfig

I'm running CentOS 7.2 on my Cloud Account and following some tutorials to install Grafana. I've almost finished install but got stuck when they asked me to execute this command which used to start ...
0
votes
1answer
32 views

How to use the 'date' command to display week number of the year?

I want the UNIX date to output: So this is week 35 of 2016. Here, of course, 35 and 2016 are outputs of the date command. I have tried the following: date +%U This printed out the current week ...
2
votes
0answers
23 views

Sometimes my zsh messes the end of lines

I have this strange issue, that I cannot find the source of, nor a solution to solve. "Sometimes" my zsh gets messed up and start display end of lines in a funny way: As you can see, the newlines ...
1
vote
2answers
31 views

gunzip multiple files

I have a directory where there are multiple folders, each of folder contains a .gz file. How can I unzip all of them at once? My data looks like this List of folders A B C D In every of them ...
0
votes
2answers
209 views

APT repositories on Android

I am using a terminal emulator on Android called "Termux". It comes with the APT command installed. However, the repository is very limited. What I want to do, is to see if larger repositories like ...
1
vote
1answer
45 views

Pass a list of URLs contained in a file to curl

I have to set ACL on a multiple files. I have downloaded a list of object stored using below commands. C:\Users\Gshrivastava\Downloads\curl_748_0>curl -o urlname.csv -i -k -H "Authorization: ...
11
votes
5answers
10k views

Get list of subdirectories which contain a file matching a string

How can I get a list of the subdirectories which contain a file matching a particular string? More specifically, I am looking for directories which contain a file with the letter 'f' somewhere ...
32
votes
4answers
44k views

SSH inside SSH fails with “stdin: is not a tty”

I'm trying to connect to machine one with ssh and then connect to another machine two with ssh, but I get this error. ssh user@computerone.com 'ssh otheruser@computertwo.com' stdin: is not a tty ...
0
votes
0answers
4 views

Is there a command to explicit the Ubuntu flavour? [migrated]

I know that the lsb_release command echoes the Ubuntu version I'm currently using. But is there a command that prompts the system flavor (Ubuntu, Lubuntu, Kubuntu, Edubuntu, etc.) I'm in? Like: $ ...
0
votes
2answers
50 views

What can cause my shell to look like this? [duplicate]

I'm currently developing a home automation framework for my apartment. This involves getting JSON over Serial from an Arduino. When the JSON can't be parsed (usually only on startup) I log it as an ...
0
votes
3answers
2k views

Bring up shutdown menu of Cinnamon via command line

How can I bring up the shutdown menu of Cinnamon via command line? Note: I don't want the user menu. This menu for switching or logging out a user is brought up via Ctrl+Alt+Del.
2
votes
2answers
137 views

How do I double each line of piped output? [duplicate]

How do I double each line of input piped in? Example: echo "foobar" | MYSTERY_COMMAND foobar foobar
0
votes
0answers
21 views

Trace route taken through multiple simulated link clicks on the Linux command-line

I have a Twitter post which links to a website. The website has a counter on it that checks the number of people who have accessed the page. However, I noticed that when looking at the Twitter ...
3
votes
1answer
43 views

Understanding the following find command

I am currently having a hard time understanding the following find command: find / -o -group `id -g` -perm \  -g=w -perm -u=s -o -perm -o=w\ -perm -u=s -o -perm -o=w \ -perm -g=s -ls  ...
3
votes
2answers
96 views

How can I CTRL^C out of a password prompt?

Say I started a su command, and I want to cancel it. Control+C doesn't work for su like it does for sudo... I have to finish the prompt (either by getting the password wrong enough times or by ...
4
votes
2answers
159 views

Why does tmux fail to “scroll” when entering a command that exceeds one line? (OSX Terminal.app)

When I use tmux and enter a command that exceeds the line, it fails to redraw the previous line. It simply clears the current line and I can't see what I just wrote. It does only redraw the first ...
8
votes
6answers
5k views

Read out pulseaudio volume from commandline? (I want: “pactl GET-sink-volume”)

I want to read out the volume level I can set with pactl set-sink-volume $SINK $VOLUME Is there an easy way to do that? As easy as the hypothetical pactl get-sink-volume $SINK ? (What I'm ...
141
votes
11answers
121k views

How can I close a terminal without killing the command running in it?

Sometimes I want to start a process and forget about it. If I start it from the command line, like this: redshift I can't close the terminal, or it will kill the process. Can I run a command in ...
1
vote
2answers
2k views

How to get sound intensity of an audio input through terminal?

I want to know the intensity of the sound being heard by an audio in source like a mic or Line-in through Command line. Kinda like the progressbar under the mouse but in CLI. audiointensity mic0 10 ...
0
votes
2answers
43 views

How to burn an iso image from the command line

Is that possible to get an alternative to the command dd to burn an iso image including some options: Detect the burning device , Burn an iso image and eject the CD from the command line?
9
votes
2answers
8k views

How can I install ncdu on Red Hat?

The answers provided to this question doesn't help. I'ved tried yum install ncdu But I'm getting No package ncdu available
15
votes
12answers
7k views

Console Text Editor with Windows-like keyboard shortcuts (ctrl-z, x, c, v)

Ok, I realise that I risk a religious war asking a question about text editors, but here goes. Requirements Mostly used for config file edits Text based not GUI Available for Raspian flavour of ...
2
votes
1answer
64 views

How to delete files with ~?

I have removed all my python code from the home directory, but when I do ls I get: a11.py~ class1.pdf foobar.txt~ n1 pic.py~ When I do ls like this: ls *.py I get: ls: cannot access *.py: No ...
1
vote
1answer
25 views

How to run a process and find how much memory it uses? [duplicate]

I regularly use time to find out how long a process takes. Is there an equivalent command for memory? The usual ways to find out how much memory a process takes (ps,/proc/meminfo, etc.) work fine for ...
0
votes
2answers
44 views

return first instance of characters from a list

Lets say I have the output of this command saved to a file. cat /dev/urandom | tr -dc '[:graph:]' | fold -w 1000 | perl -pe 's/(.)(?=.*?\1)//g' | head -n 50 I would like to compare only the first n ...
5
votes
3answers
6k 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 ...
17
votes
4answers
1k views

How can I see the whole file and also wait for more data to be added to that file?

I want to read whole file and make it waiting for input, just like tail -f but with the complete file displayed. The length of this file will always change, because this is a .log file. How can I ...
2
votes
1answer
40 views

Debian : Installing Coturn causing error, and package not getting removed.

I am working on install Coturn which is an open-source Stun and TURN server. For that, I had two options, one was to download the debian package and install it by gdebi, and other was to make the ...
48
votes
2answers
40k views

How to suspend and resume processes

In the bash terminal I can hit Control+Z to suspend any running process... then I can type fg to resume the process. Is it possible to suspend a process if I only have it's PID? And if so, what ...
31
votes
7answers
4k views

How do I create a blank PDF from the command line?

I recently needed a single blank PDF page (8.5" x 11" size) and realized that I didn't know how to make one from the command line. Issuing touch blank.pdf produces an empty PDF file. Is there a ...
1
vote
2answers
167 views

Bash commands not found

I use CentOS 7 and I install anaconda and some tools, after that some basic command like clear which not work. [zhilevan@localhost ~]$ clear bash: clear: command not found... when I echo $PATH I ...
0
votes
1answer
33 views

Can all of fork(), exec() and system() be wrong? [closed]

I understand why it could be less than best practice if I write C code that executes shell commands by calling system() and that it's better to use exec and fork but then a very experienced C ...
0
votes
1answer
55 views

How to use ClamAV to scan the memory

How can I only scan the computer RAM for viruses using the ClamAV command clamscan? I already tried, because I found it on ClamWin forum: clamscan --memory But it seems, that the Linux version ...
2
votes
3answers
39 views

Is there a way to see the dimensions of a jpeg file in linux using the command line?

I have some .jpeg images saved in a file in a cluster at school. I am at home using PuTTY to access one of the Debian nodes. I'm able to get to the folder with all the images but I need to see the ...
1
vote
2answers
40 views

how to move set of files in one-liner [duplicate]

I wanted to move 1000 files in a directory to another dir. I can do it if I'm in the original dir but if I try this mv $(ls /home/jeremy/source|tail -1000) /home/jeremy/dest from elsewhere, the ...
9
votes
4answers
16k views

Command Line Tool for monitoring Java Heap

Is there any command line tool for monitoring the heap size usage of Java in CentOS?
0
votes
1answer
60 views

What is the meaning of xargs show limits output

You can use xargs to discover limits about the commandline you're using: $ xargs --show-limits Your environment variables take up 1901 bytes POSIX upper limit on argument length (this system): ...
1
vote
1answer
35 views

Trying to copy/paste long script with multiple EOFs, Terminal starts running half-way through

Was trying to create a text block that I could just copy and paste into a Terminal window to accomplish something (in this case, create a systemd script to do maintenance on MySQL dbs, create a timer ...
0
votes
3answers
26 views

How to apply dos2unix recursively to all the contents of a folder?

Is there a way to apply the dos2unix command so that it runs against all of the files in a folder and it's subfolders? man dos2unix doesn't show any -r or similar options that would make this ...
10
votes
2answers
3k views

Check ping statistics without stopping

Is there a way to tell ping to show its usual termination statistics without stopping the execution? For instance, I'd like to quickly view: --- 8.8.8.8 ping statistics --- 2410 packets transmitted, ...
7
votes
6answers
4k views

How to grep-inverse-match and exclude “before” and “after” lines

Consider a text file with the following entries: aaa bbb ccc ddd eee fff ggg hhh iii Given a pattern (e.g. fff), I would like to grep the file above to get in the output: all_lines except ...
1
vote
2answers
47 views

How to find all files in /etc beginning with P

I would like to know how to find all files in the /etc file beginning with P, which I will then store the results of in a new file. So far I have $find /etc -name Unsure of what comes next.
5
votes
2answers
904 views

Why does Bash history not record this command?

The command printf "#!/bin/bash\n" > t generates an error(bash: !/bin/bash\n": event not found), but hitting the up key does not recall the command so that I can modify it. Why is that? (What I ...