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

learn more… | top users | synonyms (1)

0
votes
0answers
15 views

How to disown and output to /dev/null every GUI application?

Is the any way to make every GUI application to be disowned and produce no output? Some configuration which would interpret: firefox as: firefox &>/dev/null & disown But it would ...
1
vote
3answers
34 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>'? ...
1
vote
1answer
43 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 ...
0
votes
0answers
54 views

Mirrored Linux Commands [closed]

I've encountered two incidents where commands (or logic flow) is given forward and backwards In bash scripts: if ... fi (use to closed an if-statement) and in GNU/Linux command line: cat; tac (cat ...
1
vote
0answers
15 views

Mirrored Linux Commands [duplicate]

I've encountered two incidents where commands (or logic flow) is given forward and backwards In bash scripts: if ... fi (use to closed an if-statement) and in GNU/Linux command line: cat; tac (cat ...
3
votes
2answers
39 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
419 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
43 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
40 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 ...
-3
votes
0answers
22 views

How can I join domain on window 7 on suse [closed]

When I join domain on window 7 with suse I can not Join because It is displayed like
-1
votes
1answer
35 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
38 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
88 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
34 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
28 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
122 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
277 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
20 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 ...
2
votes
1answer
59 views

Why are aliases missing inside of bash command?

When I run in my terminal: alias a list with all my aliases (defined in ~/bashrc and ~/.bash_aliases files) will be displayed on my terminal. That's nice and as expected! But when I run: bash -c ...
3
votes
2answers
132 views

Creating a messagebox using commandline

How can I create a message box using command-line to show a text‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌?
2
votes
0answers
44 views

How to make grub Command Line Default?

I'd like to make grub by default load it's command line instead of automatically booting from it's list of options generated by update-grub. How can I do this?
1
vote
2answers
63 views

wget to get all the files in a directory only returns index.html

I'm new to using bash, and I have been trying to wget all the files from a website to the server I have been working on. However all I'm getting back is an index.html file. I let it run for 15 minutes ...
23
votes
4answers
2k views

Is it possible to define a command in bash?

For example, can I set gb = cd /media/Dan/evolution So that everytime I execute gb in bash, I can cd to that particular directory? I find something online, alias command. But It seems can't do the ...
1
vote
4answers
99 views

How can I output the difference between 2 files?

My file consists of the the following; roughly: username:username:username:username:username The above line continues to about 600 characters. I use the awk command in order to use it as an ...
4
votes
3answers
78 views

Write text messages between Unix and Windows

Is it possible to send text messages between two users of the same LAN, but the first running Windows with cmd and the second running Linux/Unix? I am not looking for an instant messaging service. I ...
3
votes
1answer
47 views

Run command based on output of another command

OS: AIX 7100-04-1216 So basically I'm trying to write a for loop that sees which volumegroups I have on my system, which filesystems reside in those volume groups and what the size of each of those ...
2
votes
1answer
31 views

How can I make mailx inform me of new mail?

I'm trying to set up mailx on my server. On one server (Raspbian) I am informed of new mail with a message You have new mail (or something similar). On another machine (Raspbmc), I never have this ...
2
votes
2answers
49 views

How could I change Linux command to another key combination? [closed]

I'm using wmii, so Alt key Linux command was disabled. I want to change Ctrl+F and Ctrl+B to Alt+ F and Alt+ B so that I can use them to jump by word. But I searched on line, and didn't find ...
0
votes
0answers
14 views

command type “hashed”? [duplicate]

type displays information about a command's type. How would it be interpreted if used as a command name? What command "types" are there? In the following example, what does "hashed" mean? Is it ...
1
vote
3answers
74 views

Problem when splitting command with backslash in unix prompt

I often use the space-backslash combination ( ) to split a command and its parameters into various lines and make it more readable: /home/user> ls -ltra \ > file1.txt \ > file2.txt ...
3
votes
1answer
80 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, ...
1
vote
1answer
38 views

Why does the same sed regex (after grep) fail when run in a bash script vs bash command line?

Here's the script. It is successful when I run it from the BASH prompt, but not in the script. Any ideas? When I say "fails," I mean the sed regex doesn't match anything, so there is no replaced ...
2
votes
1answer
26 views

How to install package via yum in Fedora

How do I install software using yum? Can you tell me another way to install package in Fedora?
1
vote
2answers
45 views

How to use paste command for many files whose names are not numbers? (paste columns from each file to one file)

To paste many files, whose names are incremental numbers: paste {1..8}| column -s $'\t' -t What if your files wasn't named by number, but only words? It can be up to ten files, what should I do? ...
1
vote
2answers
60 views

Configure bash and/or vim to execute source ~/.bashrc everytime I finish editing it

I would like to execute source ~/.bashrc every time I finish editing a file with vim (i.e. after :wq vim command). How should I configure vim or bash to work that way?
-1
votes
1answer
42 views

man command: is there a way to know the meaning of the output of a command >

Is there a way to know the meaning of the output of a command? Example given: If I type ls -l, I get this ouput: [root@localhost junk]# ls -l total 8 -rw-r--r-- 1 root root 1862 2012-08-25 16:20 a ...
3
votes
1answer
53 views

How to set default tabs only for cat?

I prefer to set tabs 4 however this may have some side effects, such as for example ls out put may look not properly aligned. How might I configure the terminal / cat to use four spaces for tabs for ...
1
vote
1answer
76 views

What does typing a single apostrophe do in terminal? [duplicate]

I typed in a single ' by accident and I got this as a result and exited out of it after typing ' in again. ' > > ' : command not found What does this do?
3
votes
2answers
77 views

Removing blank spaces and tabs from line without messing with line endings

I am trying to remove all spaces on a file without messing with line endings. This is to be run from inside a bash script. I have tried all the solutions here: ...
15
votes
6answers
684 views

How to type several file names with fewer key strokes

If I want to convert a pdf to a png image with imagemagick I do something like: convert -trim -density 400 this_is_a_very_long_filename_of_my_pdf_file.pdf ...
6
votes
1answer
117 views

Amplify quiet passages in an mp3 file

I have an mp3 file where is a dialog with two voices and one of the voices is very quiet. Is there a command or application that is able the detect the quiet passages and amplify them? The two voices ...
1
vote
3answers
144 views

Removing a directory that has no files in it

I recently created a username and a group called gamesForAdmin. Since then I deleted it and the folder I made for it is still there: drwxr-xr-x 5 root root 4096 Jul 4 11:28 . drwxr-xr-x ...
3
votes
4answers
65 views

Generate random numbers in specific range

After googling a bit I couldn't find a simple way to generate with a shell command a random number included in a specific range, between a minimum and a maximum. I read about /dev/random, ...
9
votes
1answer
114 views

Is there a standard for writing a command synopsis?

It appears to me that everyone has their own idea on how to write a synopsis describing command usage for the end user. For example, this is the format from man grep: grep [OPTIONS] PATTERN ...
2
votes
1answer
40 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 ...
5
votes
3answers
135 views

Combining brace expansion and output redirection

Often, I use parameter expansion on the command-line, such as cp a.{ext1,ext2} which is expands to cp a.ext1 a.ext2 However, in many cases I do not use cp, but another tool, let's call it cat, ...
4
votes
1answer
58 views

Cleaning voice recordings from command line?

I have used Audacity for removing noise from recordings before, however it has very limited command line usage. I have ~100 short lecture videos which I will be watching over the next few months and ...
4
votes
1answer
105 views

Can't connect to an external RDS TSG server from home

We have a company RDS (Remote Desktop Server) TSG (Terminal Services Gateway) server, which allows employees to connect to an RDS session from home, so they can see a work RDS desktop from home. This ...
1
vote
1answer
49 views

How to find list of available shells by command-line?

How to list available shells for use by command-line?
2
votes
0answers
29 views

Import VPN config files to NetworkManager from command line

One can import .ovpn files to NetworkManager through GUI tool nm-connection-editor (right click on nm-applet and click on Edit connections): Add -> Import a saved VPN configuration.... My goal is to ...