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

learn more… | top users | synonyms (1)

1
vote
1answer
908 views

How can I move between words in the command prompt in tcsh in linux?

I want a feature like vim's going forward or backwards command (w,e,ge,b) etc in the shell prompt. I am using tcsh shell in Linux. I would like to go 'n' number of words backs or forward etc and do ...
3
votes
2answers
257 views

Can I run a command after the user uses Ctrl-C to kill a command?

So at my position we use a shared set of aliases to do builds. Something like... alias 'build'='cd $BUILD_ROOT; m; cp ...; cp...; deploy; deploy; deploy; cd -' This is super irritating because the ...
11
votes
3answers
2k views

Is there a way to simulate a “Close” event on various windows using the terminal?

I answered on Ask Ubuntu Quit all instances of gnome-terminal via a command but as you all can read gnome-terminal didn't seems to have a SIGcall I could use to simulate this "Close" event. So this ...
4
votes
3answers
3k views

How to find first match in multiple files

Is there a way for the find command to search for the first match or occurrence of a string or pattern within each of multiple files? I've been using the usual syntax: find dir -iname '*.ext' -exec ...
2
votes
1answer
563 views

How can I clear portion of what is typed into the prompt while working on Linux and using C-shell?

I am working in Linux and C-shell. Often times I would require to change some portion of what is there already in the prompt that I obtain from reverse searching through the history command by use of ...
1
vote
2answers
61 views

Can I see in history output from which directory I had actually issued a command?

CTRL+R allows me to reverse search through the command history which is great but can I also find out from which directory that command was run? I am using C-shell in Linux.
2
votes
2answers
110 views

How can I execute a shell script that exists in a longish path with a single command without first cd'ing to the directory?

In Linux I always cd to a longish path and then run the script: cd /scratch/someDir/someOthernestedDir/ ./shellscriptName.sh How can I avoid achieve typing this longish path and then executing ...
3
votes
1answer
219 views

How to make the command multi-line?

The following command: thunderbird -compose to=abc@example.com,subject=testmail,body="something" works, but only if it has no comma in the body tag. It works with: "dsafdsafcc \/sda/fads ;.f af af ...
1
vote
3answers
2k views

How can I start a process using cpulimit?

I am trying to use cpulimit for testing an app I'm developing under low resource conditions, and I need the process to start under the influence of cpulimit. It is not sufficient to start the program ...
15
votes
3answers
13k views

Add album-art cover to mp3/ogg file from command-line in batch mode?

I am looking for a software in Linux, that will add the album-art/cover to each of the selected files in batch-mode. The album art is a jpg/png stored in my computer. It will be awesome if it can ...
0
votes
1answer
207 views

how to remove a file named “-f” from the command-line? [duplicate]

Here are some options a) rm -f b) rm "-f" (double quotes) c) rm '-f' (single quotes) d) all of the above e) none of the above
3
votes
1answer
298 views

How do I access a flash drive that has been ejected without physically plugging it out and back in? [duplicate]

When I plug in my flash drive, it gets auto-mounted. If I right click on the drive and select 'eject', then it's unmounted. Now, I want to remount the drive in Terminal. How do I do this? I've ...
21
votes
3answers
12k views

how to download a file using just bash and nothing else (no curl, wget, perl, etc.)

I have a minimal headless *nix which does not have any command line utilities for downloading files (e.g. no curl, wget, etc). I only have bash. How can I download a file? Ideally, I would like a ...
5
votes
2answers
302 views

cURL <- feature

$ cat file | curl -F 'sprunge=<-' http://sprunge.us So the output of echo gets passed as a POST parameter to cURL. Is this a cURL specific feature?
-1
votes
1answer
121 views

How to use the “source” command to run commands simultaneously?

For example, I have an executable called ex01 (C++ program). And I have a text file that contains a set of invocations of this program with different arguments. The text file looks like this: ...
1
vote
0answers
128 views

boot updated kernel image on beagleboard

Boot updated kernel image on beagleboard. I had installed a kernel on Beagle-board to update image of kernel to it. I've used this command: $ sudo apt-get install linux-image-3.2.0.49-omap It ...
3
votes
1answer
619 views

How can I stress test a command line tool?

I'd like to try to stress-test a PHP script I've written, which accesses the filesystem, to see how it copes with load and parallel access. I'd like to run this script x times in y different ...
3
votes
1answer
1k views

How to pipe diff into Kompare?

I want to quickly compare files in two different directories to see if the files are the same (same content). I want to see the results in Kompare (I'm on KDE - Kubuntu 12.04). Here's my diff ...
2
votes
3answers
793 views

Trying to send HTML mail on mac OSX Mountain Lion

I'm trying to send email with an html file as the body (it's actually a cucumber results report if that matters) or an attachment (if sending it as the body does not work) via the command line I've ...
3
votes
4answers
805 views

How to get the id of a very short child process if the parent is known?

I'm looking for a way to get the PID of a short child process in Linux. The process is instant from a human perspective. I know the parent process which will spawn the child process. Is there a way ...
4
votes
2answers
9k views

Bash (single line): Execute 2nd command if first succeeds, execute 3rd if it doesn't?

I want to execute two commands one after another via SSH. I don't have an interactive shell. The second command should only execute if the first one succeeds, but the line is inside a script, so I'd ...
16
votes
2answers
2k views

Is it harmful to close a terminal window without properly exiting an application?

Using Ubuntu 12.04 LTS, my question is that if I started an application in a terminal window, then is there anything bad about just closing the terminal window without exiting the application properly ...
1
vote
2answers
468 views

Getting specific line from terminal output

"Hmm, I need to edit file-i-must-edit-2, but I cannot remember where it is." locate file-i-must-edit /home/user/file-i-must-edit-1 /home/user/file-i-must-edit-2 /home/user/file-i-must-edit-3 ...
1
vote
2answers
402 views

MacOsx - Shell - list all .php files and their octal permissions, inside a specifc folder

is it possible to list all the ".php" files located into a direcotry and their octal permissions? I would like to list them like this: 775 /folder/file.php 644 /folder/asd/file2.php etc...
3
votes
1answer
573 views

Use time ,timeout and ulimit commands properly

I'm running a command in CentOS and at the same time I want to do 2 things: write the run time of the command to a file and set a time limit which stops the command I implemented the first one ...
1
vote
2answers
161 views

Package name suggestion in fedora

In Ubuntu when an app is not installed and in Terminal you type for example gvim it says that this app is contained in package vim-gnome and try installing that but in fedora that doesn't happen with ...
2
votes
1answer
437 views

How can I work around the program failing if there is *any* stdin?

For example, the following works fine: /usr/bin/program It produces some output, and gets to result. But if I invoke it like this: echo -n | /usr/bin/program or this echo -n | bash -c ...
1
vote
1answer
341 views

mutt weird action

I wrote a little script to send multiple mails from a list with differents subjects. #!/bin/bash while read -a line do mailadd=${line[0]} subject=${line[1]} mutt -s `echo $subject` `echo ...
12
votes
4answers
14k views

View permission / owner of full directory tree

I remember doing someting like "XXX /home/user/dir/child/file" and it returned the owner and/or permission of: /home /home/user /home/user/dir /home/user/child /home/user/child/file But I don't ...
1
vote
1answer
2k views

Configuring Real VNC on RHEL 6.3 Command Line

I am trying to setup real vnc server on my RHEL via command line. I have done the following steps Downloaded the Real VNC installer from Real VNC for Red Hat 64 bit system Unizipped it to get to ...
8
votes
2answers
11k views

Better way to add alternative using update-alternatives?

I'm sorry for my bad writing, I'm not a native speaker. I've looked up the manual of update-alternatives several times but I can't find out how to show the current link pointing to a specific ...
1
vote
2answers
2k views

How can I make “bind” command to work in sh shell

How can I make the next script to run when I'm using sh shell: #!/bin/bash bind '^[[3'=prefix-2 bind '^[[3~'=delete-char-forward bind '^[[1'=prefix-2 bind '^[[1~'=beginning-of-line bind ...
0
votes
1answer
159 views

how to list all the internet's IP ranges? [closed]

I was wondering if I list all the IP ranges directly available on the internet. perhaps also group them by country and ISP? I know that a lot of people do research nowadays on datamining and ...
0
votes
2answers
706 views

How to stop Rainlendar from hiding on the Linux Mint desktop?

Rainlendar is a great tool to keep events and tasks on the desktop (I did not find a better solution yet). The problem is that the application completely hides if you press: The "Show Desktop" ...
0
votes
3answers
48 views

how to touch files like report-07/05/13

when I want to touch files like report-05/07/13 with command touch report-$(date +%D) it gives me an error like this: touch: cannot touchreport-07/05/13': No such file or directory` How can I build ...
2
votes
1answer
5k views

How to disable VLC output in command-line mode?

When I play music on vlc or cvlc in terminal or console there is always this (shown below) non-stopping output that prevents me from issuing commands by pressing ENTER key. I want to disable it, I ...
4
votes
1answer
4k views

How can I create a shortcut to resize panes in a tmux window?

I am having lots of issues with tmux in mac. Another problem I have is that I can not bind a key in my tmux.conf to be able to resize my panes. What I need is the CTRL-b: resize-pane -U 10 I currently ...
3
votes
1answer
163 views

How can I change the error messages for 'touch'?

Lets just have some typical usage of touch as expected: $ touch this $ sudo chown root this $ touch this touch: this: Permission denied Now what I want to do is change touch: this: Permission ...
0
votes
0answers
1k views

RUN WIN CLI commands from linux ( WINEXE )

my target is to run windows command from linux ( WINEXE ) I search and find the wine tool ( this tool can run WIN command from the linux machine I have Linux machine version red-hat3 I take the ...
1
vote
1answer
790 views

How does -exec actually work

I am confused on the -exec command. E.g. in this case: find . -type f -name "*.c" -exec cat {} \;>all_c_files.txt It seems that I get cat file1 file2 file3 ... fileN While in this case: ...
3
votes
3answers
528 views

Launch a process with limited permissions

I'd like to be able to launch processes with very limited permissions from the command line, basically so that I can run a process that I don't understand without it having access to things in my user ...
50
votes
3answers
40k views

What are the differences between most, more and less?

I'm now using Arch Linux, and find a command most works like more and less. To understand the differences between them is a confusing problem. This Question has mentioned the differences between less ...
3
votes
3answers
2k views

Are there any command line utilities that can capture joystick button presses?

Here's my situation: I have a Raspberry Pi with Raspbian installed on it. I also have RetroArch installed and a simple USB gamepad hooked up. Everything works fine, but I wanted to set it up so that ...
3
votes
2answers
6k views

How do I run a command on multiple files

This is pretty basic, I have a folder with several subfolders of JS files and i want to run Google's Clojure compiler on all of the files in those folders. The command to process a single file is as ...
0
votes
2answers
478 views

How to interact with program from command line

Is there any method to interact with a program directly from the commmand line? For example, I've a program, data.o, which produces a file mydata.out and then I want to plot it with gnuplot. I can ...
0
votes
1answer
294 views

How can I see the rate of my wireless card?

I am setting manually the bit-rate of my wireless card ! sudo iwconfig wlan0 rate 54M Where can I see if it is applied, because the command does not give any feedback !!!
3
votes
2answers
547 views

convert bulk of text files to pdf with naming based upon header file

Knowing that "How to convert from text to .pdf" is already well answered here link and here link, I am looking for something more specific: Using Claws-Mail [website] and a Plug-In [RSSyl] to read ...
4
votes
4answers
2k views

What does <<< mean? [duplicate]

What does <<< mean? Here is an example: $ sed 's/a/b/g' <<< "aaa" bbb Is it something general that works with more Linux commands? It looks like it's feeding the sed program with ...
0
votes
0answers
46 views

User drive is not showing

I'll try my best explaining this: /dev/disk0 /dev/disk0s1 /dev/disk0s2 disk0 does not show up at all, when I login even my desktop is completely blank with no dock nor toolbar so even to logout is ...
0
votes
1answer
90 views

Does the command-line interpretor interface with the kernel/device drivers the same way as a normal GUI-program would?

For example, unmounting is implemented in a filesystem. Changing video resolution is implemented in a computer program that keeps track of and manages the display on a monitor with use of video ...