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

learn more… | top users | synonyms (1)

1
vote
1answer
22 views

View path options when using readline?

When I am typing in a path at the bash prompt I sometimes do not remember what the directories are so I cannot incrementally search for them. Is there a way in readline to cycle through the ...
1
vote
1answer
35 views

detecting sound from speakers

I have decided to make a radio from my old laptop. I installed Puppy linux and set special features, like: after waking up, it turns on my favorite online radio (openFM) and switches off the screen. ...
1
vote
2answers
48 views

A quicker way to change owner/group recursively? [duplicate]

Currently, when I want to change owner/group recursively, I do this: find . -type f -exec chown <owner>.<group> {} \; find . -type d -exec chown <owner>.<group> {} \; But ...
0
votes
2answers
47 views

How can I copy a hidden directory recursively and preserving its permissions?

mkdir backupcache cp -rp .cache backupcache # or cp -rp \.cache backupcache does not work nothing gets copied and directory backupcache remains empty
1
vote
2answers
124 views

find: meaning of the \? sign as a value of the name parameter

What is the meaning of the ? sign in the following command? find /foo/path -name \?
3
votes
4answers
147 views

Where should I save color codes for the PS1 command line / terminal? [closed]

This question is about best practices. I know logging in over secure shell or switching users su, and su -l have different effects. Also, in the event you make a typo in the configuration, you still ...
1
vote
4answers
66 views

execute command over ssh connection [duplicate]

I want to excecute the following command over a ssh connection: tmpValue=$(cat /var/run/jboss-as/jboss-as-standalone8.pid) && top -b -U jboss -n 1 |grep $tmpValue |awk '{print $9}' This ...
1
vote
1answer
84 views

pattern matching without echo

Why are the outputs different? touch a aa bb ccc echo * a aa bb ccc // I understood, * means matches zero or more * aa bb ccc // I'm confused. echo ? a //OK ? a aa bb ccc // confused ...
1
vote
2answers
63 views

List of mount points of external storage devices such as USB keyfobs and SATA external drives, from the cli

I need to list all mount points associates to external storage devices such as USB keyfobs and SATA external drives. The only way I found under Ubuntu, is to call 'mount' and grep for '/media'. But ...
1
vote
1answer
70 views

copy huge number of files into date structured directory order

I need to copy around 40.0000 files into date structured folders. example file: /var/public/voicelogging/quality_monitoring/20151209/bbbbbb_I_20151209-185841_xxxxxx_12434_89343.WAV Is one of the ...
4
votes
4answers
63 views

Most efficient way to thin out a backup which uses hardlinks

I have a backup disk which contains hundreds of backups of the same machine from different dates. The backup was made with rsync and hardlinks, i.e. if a file doesn't change the backup script just ...
-3
votes
2answers
73 views

find all jpg images from specific directory and copy it to other directory

How do I copy all the jpg images [files whose names end with .jpg] that exist in the directory /usr/share/backgrounds into to the jpg directory in /week/pictures/final/jpg then redirect any error ...
2
votes
1answer
43 views

Extract TOC of epub file

Lately I hit the command that will print the TOC of a pdf file. mutool show file.pdf outline I'd like to use a command for the epub format with similar simplicity of usage and nice result as the ...
1
vote
0answers
26 views

What happens if I try to use a device driver from the shell and it is already being used by the kernel?

This is the situation. I'm new to embedded linux and I'm trying to test some commands for the LED driver LP5521. The board I have has a RGB LED with this controller IC and it is being initialized with ...
-1
votes
3answers
29 views

Get compilate date [duplicate]

I am trying to extract the compilation date from a linux command (or cpp would be fine too). I am using: stat -c %z ./myProgram.bin However, if I copy myProgram.bin to an another place via ssh for ...
4
votes
1answer
63 views

Why grepping with color doesn't return anything?

I've got the following foo.txt file: This is the first line. This is the middle line. This is the last line. And I'm trying to grep the middle line just by the word middle and return the ...
0
votes
1answer
46 views

Why am I receiving the error: “sudo: update_prebinding: command not found” on the command line?

One of my applications won't open so I'm trying the first thing to do on this website: http://www.cnet.com/news/tutorial-what-to-do-when-a-mac-os-x-application-will-not-launch/ But I am getting an ...
3
votes
1answer
40 views

groupadd -p Not Recommended?

I have a question about groupadd, specifically with password (-p). It says it is not recommended, "This option is not recommended because the password (or encrypted password) will be visible by users ...
0
votes
1answer
54 views

FFMpeg : Creating a video clip of approx. 10 seconds when video duration is unknown without audio-

I am working on a project where I am looking to extract a video clip from an input video. I have found many links(Eg : link) which do this task, but in all this I have to specify video duration. ...
1
vote
1answer
66 views

Command works, and then doesn't (cd/ls)

I'm currently doing my thesis and thus working on a school server. And unfortunately, I'm struggling with even the most basic concepts. Such as this. I have a directory /home/myname/Data If I'm in /...
0
votes
1answer
78 views

How to write bash script while using command as condition in if statement?

I am writing a bash script to process input from html form. I have two issues which I can't seem to be able to figure out. I am a beginner to Unix. First problem is that I can't get my if statement ...
2
votes
1answer
32 views

Improve existing alias to dynamically replace command line text

I have an alias in .bashrc like this: alias ylog = "yarn logs -applicationId" This works well when I do ylog application_123. Sometimes, my job names come in the form of job_123 instead of ...
1
vote
3answers
77 views

How can I print a section of a manual (man)?

From command line, how can I do in order to show a specific section of the result of man something? For example, if I wanted to get some information about the return value of C function write, I'd ...
1
vote
1answer
35 views

Is there an additional option to display hidden command on the terminal?

Copy and pasting from a website to the terminal is very harmful , there are an example here You past the following line :ls /some/thing/much/too/long/to/type/ , by pressing Enter the following ...
1
vote
1answer
67 views

Command line tool for easy multiline regex search and replace

I use PCRE regular expressions for search and replace very often when working with a text editor and I was left quite unhappy after I found out that in powerful Unix command line tools like perl, awk ...
1
vote
1answer
50 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 adnan@vm085:~/...
2
votes
2answers
76 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.
4
votes
1answer
145 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 ...
0
votes
3answers
77 views

How do I remove a dot dollar no name directory

I have this weird directory in Oracle Linux that I cannot remove, cannot change owner, cannot change group, etc. It seems to be an environment variable that is empty and is named: .$EXTEND Here's ...
1
vote
1answer
76 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 ...
2
votes
1answer
45 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
1answer
65 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
29 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
114 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 ...
1
vote
2answers
64 views

How to upgrade/downgrade a specific package from “sid” on debian jessie “stable”? [duplicate]

I need to upgrade some specifics packages from sid on debian jessie stable with their dependencies. By adding the following repo : deb http://ftp.fr.debian.org/debian/ sid main deb-src http://ftp....
1
vote
1answer
75 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: ...
0
votes
0answers
24 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
51 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  ...
2
votes
2answers
145 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
2answers
48 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?
2
votes
1answer
69 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 ...
21
votes
5answers
2k views

How to run a command at an average of 5 times per second?

I have a command-line script that performs an API call and updates a database with the results. I have a limit of 5 API calls per second with the API provider. The script takes more than 0.2 seconds ...
1
vote
1answer
29 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 ...
2
votes
1answer
86 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 ...
1
vote
2answers
488 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
37 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
90 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 ...
0
votes
2answers
60 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 ...
1
vote
2answers
42 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 ...
2
votes
3answers
43 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 ...