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

learn more… | top users | synonyms (1)

1
vote
3answers
31 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, ...
1
vote
0answers
12 views

How to connect tata photon in X window manager in ubuntu using command line

Due to some reason I had to shift from Gnome to X window manager. So here on the desktop nothing appears (no launcher, no menu bar, nothing) but we can open command line in it using Ctrl+Alt+Tab. (I ...
0
votes
0answers
20 views

terminal valid path doesn't exist

I am having an odd issue where a path I generate from an HTTP POST does not register as valid, even though it clearly is. For example: This generated path ...
1
vote
1answer
28 views

Apply recursive chmod to files or folders only

I'd like to apply chmods to files and folders in one line, Basically: chmod 700 ./* -R # but only apply to folders chmod 600 ./* -R # but only apply to files Of course I searched google and read ...
2
votes
1answer
18 views

How to sort files based on the json property value inside the file?

I've downloaded list of videos via youtube-dl and each file has corresponding .json file containing certain properties. So I would like to sort the files based on the selected json property which is ...
1
vote
3answers
69 views

Pulling Lines X-Y From List of Files Found

Ultimately I need to grab lines 3-53 from ever csv in each subdirectory. I grabbed the lines like so (cat isn't necessarily required): cat /[path]/[file].csv | head -53 | tail -51 And the files ...
4
votes
3answers
254 views

How to disable beep sound in Linux CentOS 7 command line? [duplicate]

I just installed the basic Linux CentOS 7 (no desktop) and am experimenting with the system. Every time I make a mistake (entering things that the command line doesn't like), the computer beeps and ...
0
votes
0answers
5 views

Is there a way to scan all configured maven repos for a a package?

Lets say I am writing code and I decided I want a certain package, but I don't know rather the repos I have setup have that package, or which version of the package they may have. Is there a quick ...
1
vote
1answer
28 views

how to detect video completion in vlc

Vlc provide documents in which there are lots of command are given to control vlc from command line. Here is the link of documentation. Now in my task, I need to run a video in a loop, for this I am ...
1
vote
4answers
365 views

Why do we use double hyphen in “tar --anchored” and single hyphen in “tar -b”? [duplicate]

Why do we use double hyphen in tar --anchored and single hyphen in tar -b? I mean to say why some command line options have single hyphen (-) while some others have double (--)? Also a git example: ...
1
vote
3answers
98 views

How to do command-line completion with files and folders

As a new Linux user, one of the things that's kept me away from the Command Line (CL) is that, for tasks involving files and folders (i.e. everything!), the amount of typing involved makes using the ...
3
votes
1answer
73 views

Set Ubuntu System Proxy Settings without Restart from commandline

I am using Ubuntu 14.04 . I want to change the http proxy settings from the command line. This should be equivalent to changing in the GUI(All Settings->Network->Network Proxy) and clicking the button ...
4
votes
0answers
42 views
+50

How to write/edit/update the OsIndications efi variable from command line?

In the need to enter the UEFI firmware setup utility while using ultra fast boot (keyboard drivers are not loaded during POST), I wish to write to the "Os Indications" efi variable. My OS is Ubuntu ...
2
votes
2answers
137 views

Print text from terminal

I would like to use a Linux distro without a desktop environment, but I need to print out homework that I type up. I could always email it to myself and print from another computer, but it would be ...
5
votes
0answers
113 views

Echo difference between Ubuntu and Red Hat

I have mostly been experimenting with Ubuntu but recently was using a Red Hat Enterprise system and was surprised at a difference I found setting and displaying environment variables. In Ubuntu I ...
2
votes
1answer
52 views

Login to Skype from terminal or any other way

Please let me know if anybody knows how to login to Skype on Linux Mint from terminal or any other way? I have tried a lot but nothing found. Desktop # ./skype.desktop ./skype.desktop: line 1: ...
0
votes
0answers
24 views

characters stick at the CLI [duplicate]

When I press arrow up to search through the command history, some characters always remain at the beginning of the command line. Does anyone know what's going on ? How can I fix it? for example, I ...
7
votes
2answers
240 views

Is there a shortcut for repeat the second proximate command in bash?

We all know that !! can repeat the last command you do in bash. But sometimes we need to do some operation like $ python test.py $ vim test.py $ python test.py # here is where I need to repeat the ...
15
votes
2answers
1k views

Coloring different sources for tail

I'm watching different logs by tail -q -f /var/log/syslog -f /var/log/fail2ban.log -f /var/log/nginx/error.log How can I have the output of each log colored differently?
1
vote
1answer
37 views

Listing audio files with bit rate in the command line

Is there a way to list the contents of a folder via the command line in such a way that the audio files in mp3 format have the bit rate info? I tried ls -l but it doesn't work.
1
vote
1answer
73 views

Command-line parameters in bash script not recognised

I use Debian (Raspbian) Wheezy. If this command line works fine: smsd -c sms/out -i 60 -0 -f sms/smsd.log and this alias also works fine: bsmsd='smsd -c sms/out -i 60 -0 -f sms/smsd.log' then ...
4
votes
3answers
49 views

Is it possible to view the list of file names of a zip file which is inside another zip file?

I know I can use unzip -l file.zip to view the file list of a zip file. But a got a zip file inside another zip file. I tried unzip -l file.zip/sub_file.zip, but failed. Is it possible to view the ...
2
votes
2answers
76 views

How parse a log file for a string, and when found search backwards for another string

I use the following command to parse a log file for a particular string. Then I search backwards in the log to find the data I really want. The problem as in the example below, I am only going back ...
4
votes
1answer
236 views

How to rollback network configuration changes done over SSH in case of failure?

I'm about to change iptables configuration and interface speed and duplex settings over SSH. What are the possibilities to rollback the changes in case of host becomes unreachable? I guess simple: ip ...
2
votes
3answers
41 views

Convert a number of seconds elapsed to date from arbitrary start date

I want to convert a particular amount of seconds to a date. In my case the it's the number of seconds elapsed since 1st of January 0001. If it were for seconds elapsed from epoch it would be easy: $ ...
3
votes
3answers
84 views

How can I delete text before a delimiter in Linux

I need to delete text from a line before delimiter. For example: (123434): hello::{apple,orange,mango}. I need to delete text before first :. i.e. (123434). Is there any command in linux to ...
4
votes
3answers
273 views

How to pass each line of a text file as an argument to a command?

I'm looking to write a script that takes a .txt filename as an argument, reads the file line by line, and passes each line to a command. For example, it runs command --option "LINE 1", then command ...
4
votes
2answers
158 views

Change user info on the command line

I have made a user in Mint 16 but want to change its first and last name without deleting it and starting from scratch. I know how to do it with a GUI but I want to know the terminal command ...
0
votes
1answer
35 views

Less command change color of “~” and “(END)”?

How do I change the color of the "~" characters that go along the edge of a Less command output. And how to change the color "(END)" at the bottom?
0
votes
1answer
40 views

How to start a cron task?

It sounds really simple, but many times I was stuck at the beginning of learning a new command. The tutorial writer think it's natural to start, but it's not. This is the tutorial I've been reading: ...
0
votes
3answers
102 views

Mounting /dev/dvd /media on VirtualBox

I have installed Scientific Linux on VirtualBox and I am trying to follow some exercises on a book I picked up. The first thing I need to do is: mount /dev/dvd /media But when I do that, I get ...
6
votes
2answers
178 views

How many commands can be queued up with control operators?

I have been reading up on control operators, and I was wondering if there was a limit to how many commands you could line up with control operators, such as ||, && and ;. In addition, is ...
2
votes
4answers
115 views

How to disable a shell keyword?

Using enable builtin command we can disable a shell builtin command, for example echo, as follow: enable -n echo But how can we disable a shell keyword like time? If we try: enable -n time we ...
3
votes
4answers
257 views

Make many subdirectories at once

Suppose I have a directory /, and it contains many directories /mydir, /hisdir, /herdir, and each of those need to have a similar structure. For each directory in /, there needs to be a directory doc ...
1
vote
2answers
93 views

Pass a command to ROOT from a shell script and having it stay open

I am writing a bash script to perform some analysis using the program ROOT. I want to run some initial command to load the result of the analysis, then continue using ROOT interactively. The analysis ...
2
votes
2answers
32 views

Select a range of files after sorting them

One thing I notice slower for me if I switch from using a GUI file manager to CLI is: In a GUI file manager, I can quickly select a subset of files under a dir by, first sorting them according to ...
1
vote
3answers
44 views

Command to 're-apply' previous command?

Is there an easy way to re-apply a previous command to a new command line entry? Say I typed in chmod u+r,g+x file.txt but forgot the sudo. Could I simply type sudo <some easy symbol>'? ...
2
votes
1answer
59 views

Memory buffer in a bash script

I have recently finished a script that will ask for a hostname and automatically take the argument of the function and ssh into one of my work servers. Here is a copy of my script: #!/bin/bash echo ...
2
votes
2answers
43 views

Copy a folder and its content to all Nginx vhosts host

I am interested to know if a single command line that would allow me to recursively copy a folder to all of our NGINX Virtual Host htdocs folders: I need to copy that folder to all hosts located in ...
16
votes
2answers
461 views

How to retrieve lost aliases?

Let me start by saying I know this was dumb. Time and Linux make fools of us all. I made an echo command to my .bash_aliases file and erased all of my aliases, except the test alias. However, I ...
1
vote
3answers
63 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 ...
0
votes
3answers
54 views

How do you view a sql.gz file as plain text SQL from the command line?

How do you view a sql.gz file as plain text SQL from the command line? I want to read the SQL statements stored in a .sql.gz file, from the command line on the server. I've tried tar -xzvf, but get ...
-1
votes
1answer
39 views

How to have back the command prompt after calling an application [duplicate]

In terminal I just type firefox and then Firefox starts, but I can not return to command mode anymore. How can I come back to command mode? I have already tried :q or exit, but neither work.
1
vote
1answer
64 views

Formatting an external HDD with Bash script

At my workplace we have an external HDD connected to a NAS device (Synology). There is a backup tasks which runs weekly and fills the external HDD after a while. Unfortunately the Linux-based OS of ...
3
votes
2answers
114 views

Short, simple command to create a group if it doesn't already exist?

What is the cleanest way to modify this command in bash to only run if the group does not exist? groupadd somegroupname A one-liner would be best.
2
votes
1answer
41 views

Play .wav when text scrolls in terminal

After watching a TV show, I came up with a fun idea. Is there a way to take that cheesy high-pitched sound effect they play every time text scrolls down a command-line screen on TV and play it when ...
0
votes
1answer
34 views

Must pass urls in quotes

I'm trying pass a URL to mpv for it to play it as a network stream. This can be done in bash with the following syntax: $ mpv http://myvideosite.com However, zsh wants to evaluate the URL as ...
2
votes
2answers
168 views

Remove all lines in file A which contain the strings in file B

I have a CSV file users.csv with a list of userNames, userIDs, and other data: username, userid, sidebar_side, sidebar_colour "John Lennon", 90123412, "left", "blue" "Paul McCartny", 30923833, ...
6
votes
2answers
296 views

How to find out which program can open a given file?

Let's say I have a file thesis.pdf or picture.jpg Is there a command which returns a program to open this file with? I am aware of the command file, but it just returns the correct type of the file ...
4
votes
2answers
25 views

Use non-root user configuration for root account

When I work with the terminal and use su or sudo to execute a command with the root user's permissions, is it possible to apply the configuration of my "non-root user" (from which I am invoking su or ...