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

learn more… | top users | synonyms (1)

7
votes
2answers
1k views

Cisco-like command Line Interface

I'm looking for a way to implement a fairly basic Cisco like command line interface on my Ubuntu server appliance (12.04 in particular). I've come across the following project: CLISH however, ...
5
votes
1answer
2k views

Send a command from the console to a running X server

Is it possible to send a command from the console, say tty1, to the terminal currently occupied with X (in my case tty7 as I use Debian), to tell for example mplayer to play a movie? Edit - made a ...
2
votes
2answers
4k views

Merge multiple flv files?

What tool in Linux can I use to merge multiple flv files ? Files are already in order, just put them altogether seamlessly
9
votes
2answers
15k views

Locate and delete all temporary files in user directory

I use vim a lot, and my area has power failure a lot. So the resultant is I get many *.swp files scattered over my PC. I want an alias of rm command that removes all files with either .swp, ~, ...
9
votes
3answers
491 views

How to `locate` multiple files and open them in vim?

Suppose that I have a file named filename123.txt and it is the single file that is named so, and I can locate it with the command locate filename123. And it returns only this file. Now I want to open ...
5
votes
1answer
658 views

How can I control an existing remote shell?

On my remote machine, an xterm/shell has been created (by another process). I have full access to that shell through VNC. But really I would like to be using a text mode shell on my local machine. ...
2
votes
2answers
544 views

Executing zsh rehash after build

I have a build script that can change what binaries are in my $PATH (it doesn't edit $PATH itself, but it adds/deletes files to folders that are already in $PATH). zsh's autocompletion doesn't update ...
2
votes
2answers
275 views

List all users and last time they read mail, pipeing to multiple output

I have one system that I would like to do a little clean up, so I would like to get all user accounts and last date they accessed they mail. It is a Debian system. So far I got to this: cut -d: -f1 ...
2
votes
1answer
164 views

How to have find only search for files in changed directories?

Currently I'm repeatedly doing a 'find' that's too slow. I'm searching for non-hidden executable files within "$root", excluding "$root/bin": find "$root" -type f -perm -o+x -not -path "$root/bin/*" ...
8
votes
4answers
54k views

How do I exit or cancel a bad bash command?

I expect to get some flak for this, but I can't find the answer anywhere. It seems like it should be so obvious. Sometimes, when I type a bad command in a bash terminal, the cursor just jumps down to ...
1
vote
2answers
356 views

Program to manipulate Samba shares (net.exe equivalent)

Is there an equivalent to the NET.exe suite for linux systems with which I can do net view queries for example?
6
votes
1answer
4k views

“Argument list too long”: How do I deal with it, without changing my command?

When I run a command like ls */*/*/*/*.jpg, I get the error -bash: /bin/ls: Argument list too long I know why this happens: it is because there is a kernel limit on the amount of space for ...
3
votes
4answers
831 views

How can I do the `history` command and not have line numbers so I can copy multiple line commands?

Sometimes I do the history command so I can see 4 commands in a row. I want to copy those commands so I can run them again. I usually select them with the mouse and shift-ctrl-c which works ok, but ...
5
votes
1answer
1k views

Git auto-complete

I am using Git as many of you do. Also, I don't use any GUI for that — just CLI. So I was wondering: are there any way to make Git commands (git status, git checkout etc.) complete themselves when ...
6
votes
3answers
11k views

'iwlist' -> interface doesn't support scanning (Ubuntu LTS 10.04)

I am using Ubuntu 10.04 (LTS) on a Samsung N150+ netbook. I cannot scan wifi networks using iwlist and I would like to do so. Here is the output from some tests: ...
1
vote
0answers
77 views

Creating and updating the packages for many Debian systems

I'm using a Lenny (Debian 5) for remotely controlled PC's (around 100 PC's) which will be pinging to my apache server. I'm developing a patch twice in a week to keep updated with the latest versions ...
2
votes
2answers
840 views

What would it take to add a command to run a script at the completion any given random task?

I was playing around with Pushover, and had the thought that it would be cool if I could use it as an argument on any random command, so that it would run a pushover script at the end of the task, ...
3
votes
1answer
2k views

Switch to an application using its PID

I'm using Gnome. In vim, I want to map a key to switch to Firefox. I know that I should use bash commands (a command in form of !...). Is it possible to switch to an application using its PID?
17
votes
7answers
6k views

Converting colored output into html

There are tools providing coloured output: dwdiff -c File1 File2 # word level diff grep --color=always # we all know this guy ... The question is: How to convert their colored output of arbitrary ...
3
votes
2answers
895 views

Is it possible to disable verbose in the middle of running?

I am running a program fls (from the Sleuth Kit) with option -v for verbose mode. However it takes too long, and the program is still running since yesterday. I guess it will run faster without ...
9
votes
2answers
2k views

Output ls -l size field with digits grouped by thousands?

It is possible to make ls -l output the size field with digits grouped by thousands? If so, how? For instance: $ ls -l -rw-rw---- 1 dahl dahl 43,210,052 2012-01-01 21:52 test.py (Note the commas ...
2
votes
2answers
5k views

Undo `mv` command? [duplicate]

Possible Duplicate: Moved bin and other folders! How to get them back? Hi I'm in desperate need of help. I'm quite new to linux so please bear with my stupidity! I entered the following ...
1
vote
1answer
1k views

When a command is over half the terminal size it breaks

Whenever I type in a bash command longer than about half the width of the shell window I'm in, the command breaks like it would if I filled the whole screen 3rd command in image - typed a few xs ...
5
votes
5answers
2k views

xargs and vi - “Input is not from a terminal”

I have about 10 php.ini files on my system, located all over the place, and I wanted to quickly browse through them. I tried this command: locate php.ini | xargs vi But vi warns me Input is not ...
2
votes
4answers
8k views

How to pause listing long text file with cat in command prompt after 10lines then press any key

How to pause listing long text file with cat in command prompt after 10lines then press any key. for example: cat myfiles.txt bla bla bla bla bla bla . . . bla press enter to continue
1
vote
1answer
386 views

Sun blade 2000 - no prompt

I just bought a Sun Blade 2000 and a type 7 USB keyboard from EBAY. The blade has Solaris 8 installed and while I can login, I'd rather switch to something like UBUNTU. If I type STOP - A during the ...
7
votes
2answers
7k views

Samba mount with password prompt as non-root user

I want to mount a password-protected SMB share (served by a Windows machine). The share is protected by a user name and password, and I may not write the password in a file, I want to be prompted for ...
5
votes
1answer
457 views

How to make sure OpenVPN is connected?

I need some sort of "safeguard" for my VPN connection. If the connection drops, the machine shouldn't even reach the internet. (I can reach the machine by other means.) Is it possible somehow? If I ...
3
votes
1answer
1k views

How to convert a PowerPoint ppt file into HTML files?

I have to find a free, gratis command line solution to convert primary Microsoft PowerPoint presentations into HTML files (1 HTML file per foil) on Linux (Debian, OpenSuse). It would be nice if the ...
3
votes
1answer
442 views

Live program output monitoring tool

I would like to know if there is a tool that would enable you to watch how the program output changes live. Something like tail -f but instead of monitoring the file changes, it would repeatedly call ...
2
votes
2answers
981 views

How to convert a group of video files using FFMPEG?

I have several video files in a directory and I want to convert all of them into other video formats. Is there any way that I can convert all of them in just one go using FFMPEG. I mean without having ...
0
votes
1answer
96 views

Why does this compound command report errors when copying directories? [duplicate]

Possible Duplicate: Why does this compound command report errors when copying directories? if one executes the following two commands in one line, as follows, rm -rf dir ; cp -r dir2 ...
8
votes
3answers
4k views

How can I print well formatted code

Similar to using markdown on Stack Overflow to create monospace output, how can I do that for my programs. I tried lp filename.txt and was pleasantly please to find that it was able to use the local ...
2
votes
5answers
999 views

Where are command line arguments (e.g. 'some.text') actually passed to?

From what I know, parameters you pass to a command, goes to it's STDIN stream. so this: cut -d. -f2 'some.text' should be perfectly identical to this: echo 'some.text' | cut -d. -f2 as we send ...
8
votes
2answers
3k views

Find filesystem of an unmounted partition from a script

I'm writing a custom automated install using AIF (Arch Installation Framework), and I need to find the filesystem on a partition given a partition. So far I have this: grok_partitions () { local ...
6
votes
3answers
17k views

How to check from a command line that network is reachable?

I want to send a growl to myself after SuSE server finishes the boot process. I got this message socket_sendto(): unable to write to socket [101]: Network is unreachable in. How can I check from ...
18
votes
1answer
884 views

Is there a standard command that always exits with a failure?

I want to test my script with a command that fails. I could use an existing command with bad arguments. I could also write a simple script that immediately exits with a failure. Both of these are easy ...
1
vote
5answers
9k views

checking running process

I am new babe to Linux. So please skip to read if you are not patient with begineer. Let's say I am asked to check and shut down the processes that I am not familiar with. So when I ls under bin ...
2
votes
3answers
4k views

UNIX commands help - find

I'm trying to learn UNIX commands and I'm playing this game to learn and I'm really stuck at the moment. I'm in a server through ssh and the directory is full of random files and folders and the ...
2
votes
2answers
831 views

Inner function call with xargs parameters

I am trying to create a file occurent within my /tmp directory of each file containing a speicific string. The problem is that the call to basename {} does not seem to work. Neither this, neither ...
2
votes
2answers
26k views

How to install/remove/upgrade .rpm packages on Red Hat?

I am new to linux, and at the university we are using this distribution to mount servers on VM, but I need to install a package that is missing in my virtual machine that is running Red Hat, but how ...
3
votes
2answers
295 views

Any CLI to validate URL? [closed]

I got a bunch of URLs (more than 1,000) and I am wondering if there is any CLI script to validate URL for http schema?
7
votes
3answers
813 views

Where to start creating CLI applications?

After using linux for a month or two, I know what I'm doing now. When creating programs, using whatever language, I've obviously been using code like this: $ python test.py And so if I wanted ...
10
votes
2answers
993 views

How to exit bash history search mode?

In Ubuntu 12.04 I use CTRL-R to enter a reverse history search. If the command I want is not found (after repeated CTRL-R), how do I immediately exit back to the (empty) command prompt with no ...
3
votes
1answer
1k views

How to do df only on root partition?

How can get df results only for / partition. The partition name/identification (/dev/sda2, /dev/cciss/c0d0p1) could vary on different computers.
5
votes
1answer
469 views

Is there an operator like && that ignores return status?

I've discovered the following useful trick for long-running tasks on the command line: do_some_task && make_a_noise For instance, on OSX: do_some_task && say 'done' However, ...
4
votes
1answer
797 views

How to run this in sudo?

I have this line that I execute from php sudo -u db2inst1 -s -- "/opt/ibm/db2/current/bin/db2 connect to PLC; /opt/ibm/db2/current/bin/db2 \"update EDU.contact set MOBILE_PHONE = '123'\"" it works ...
-1
votes
1answer
2k views

Check if the command exists in bash

I want to check if a given command exists in bash and I care only about the native commands of the bash and not the scripts written by the user. When I refer to native commands I mean all those ...
-1
votes
3answers
317 views

Duplicate bash prompts

I'm having an interesting issue with XFCE Terminal/Gnome Terminal (not reproducible in XTerm), where executing bash or logging in using login or su will open a new Bash instance inside a Bash instance ...
3
votes
0answers
94 views

Importing hdhomerun channels into MythTV

I am setting up a MythTV backend, to stream Live TV from. I scanned for channels with the hdhomerun_config utility, and got this However, I really don't have a clue how to import it into MythTV.