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

learn more… | top users | synonyms (1)

5
votes
3answers
578 views

Shortcut for fast recursive removal

Sometimes I want to delete large swaths of temporary files recursively, and recycle the directory name without waiting for the command to complete. (For example, if I want to nuke and re-checkout a ...
2
votes
1answer
9k views

Use configuration file for ftp with auto login enabled upon initial connection

I would like to so the same thing like in SSH where you can save the server in the config file. I would also like to save my username and password, so that it is not prompted each time I connect. I ...
1
vote
2answers
940 views

run script asynchronously / in a different process

I have a simple php script <?php for($i=0;$i<10;$i++){ sleep(1); echo $i; } Which I run from the command line php myfile.php & I would expect I can do other things in the command line, ...
3
votes
1answer
209 views

Restricting access to files on an external drive

I was wondering how to restrict access to a specific drive in Unix on the Mac. I was thinking to do this in Terminal where I create a file like this mkfile 6k secure_access. And where secure_access ...
2
votes
1answer
171 views

How can I adjust this short shell script to fit my needs?

I am attempting to force powertop to run when I log in by using the Startup Applications wizard in Ubuntu. Under the 'Command' entry, I've placed gnome-terminal -x ...
5
votes
2answers
3k views

the usage of < /dev/null & in the command line

I tried to run an example java program using the following command line. However, I do not know what is the trailing part < /dev/null & used for? java -cp /home/weka.jar ...
3
votes
1answer
330 views

How to use SCSUDO to run scripts with positional parameters?

I am trying to use scsudo to run a number of defined commands to stop and start processes on a UNIX host. The issue I am experiencing is that scsudo does not seem to like the use of positional ...
2
votes
1answer
677 views

How do I make a droplet/.app in platypus for my unix command?

This is my sample code from the platypus tutorial. I am trying to make it work with a command named pymol, and I want it to open .pdb files or open just pymol. I know nothing about perl, but I have ...
2
votes
1answer
196 views

ide and pci bus commands

Is the ide interface also a bus? Is there a command like lspci or lsusb, to find out what devices are on the ide bus? Sources seem to contradict eachother. I'm asking this question here because of the ...
9
votes
4answers
1k views

How can I get the most bang for my buck with the “diff” command?

I have tried using the linux diff command in the past without much luck or patience. I usually end up using a GUI utility like DiffMerge or Kdiff. Recently I started trying to use diff again to ...
2
votes
3answers
119 views

Filter --help command?

Sometimes I want to search/filter help for particular commands for keywords. history --help gives list of options, sometimes it's overwhelming how much info is there. Can I filter it for keywork ...
1
vote
1answer
224 views

How to create and edit a text file from the bash shell

I am logged into a linux server via ssh. From the bash shell, is there any standard way of bringing up some kind of text editing environment so I can create and edit a text file? I am aware that there ...
2
votes
3answers
320 views

Stuck between these two books? [closed]

I'm new to Unix/Linux platforms so I was hunting for good books on *nix... I soon realized there is not one book or resource. But to gain confidence on the command line and scripting (the real *nix ...
4
votes
1answer
316 views

Why did using xargs fail in this case?

I tried to understand the usage of xargs and did the following experiment. ls | xargs | touch I want to refresh the files dates and directoris in the curent directory. Though it is a bit silly,for ...
2
votes
1answer
312 views

How to know if a Linux command can read from STDIN?

I noticed this problem when I became confused with pipe, one command send its executing output to the STDOUT, which is the STDIN for the other command, which can read from STDIN. How do I know if a ...
6
votes
6answers
313 views

Searching in many files

Is there some sophisticated technique to search strings in many files? I tried this basic technique for i in `find .`; do grep searched_string "$i"; done; It doesn't look much sophisticated and ...
3
votes
2answers
2k views

Passing values through pipes

I don't quite understand pipes in Linux command line. I noticed that: ll - R | grep *.pdf will list files ending with .pdf But locate *.pdf | du -h will not calculate the size of files ...
4
votes
2answers
3k views

What command line tools are available for testing Web Service? [duplicate]

Possible Duplicate: Does anybody here have experience in automating some tasks in web applications using curl? There are a number of GUI based tools to test Web Service (e.g. soapUI) Is ...
4
votes
2answers
7k views

Converting text into ASCII/ISO-8859-1

I'm looking for some tool that can convert text, ideally from UTF-8 (but ISO-8859-2 and WINDOWS-1250 would be fine) into ASCII/ISO-8859-1? I have seen some online transliteration tools but I need ...
3
votes
2answers
101 views

Output the changes to a log file

If I use tail -f *filename* I get a real nice display of whatever is changing in a given file. However, sometimes I want to be able to search this text or otherwise look it over slowly. Is ...
3
votes
0answers
65 views

Use command line to download file which is accessible only in a given session [duplicate]

Possible Duplicate: Does anybody here have experience in automating some tasks in web applications using curl? Sorry for the lengthy title. I am trying use command line to download a ...
2
votes
4answers
2k views

Access the last file (alphabetically) in a directory

I'm trying to open a file with vim from the command line, the file is in a directory filled with automatically generated files that are prepended with a time stamp. Since I don't know the time stamps ...
16
votes
3answers
12k views

How to launch a set of program inside tmux or gnome-terminal within a script?

I wanted to launch a few commands simultaneously in tmux or gnome-terminal or xfterminal , every different tab with a single command running , and close that tab when that command finishes. Any ...
2
votes
1answer
355 views

Extract pitch information from audio file

Is there a command-line utility which would allow me to extract pitch information from an audio file and store it in a numerical form (i.e. as a list of comma-separated values)?
20
votes
1answer
8k views

How do I enable locate and queue the database to be built?

On a new Ubuntu 10.4 instance, I tried to use the locate command only to receive the error locate: can not stat () `/var/lib/mlocate/mlocate.db': No such file or directory from using this command ...
2
votes
1answer
75 views

App which can execute arbitrary code on different events

I've been looking for a simple activator which can execute some code when stuff happens, I haven't found anything yet. Maybe, I am not using the right keywords. It would be great if someone pointed me ...
5
votes
2answers
387 views

Workings of top and ps commands

How do the commands top and ps calculate CPU utilization using the /proc/[$pid]/stat file? Also how do they obtain memory utilization information about the process?
11
votes
3answers
4k views

How can I pipe output to another process, but retain the error state of the first process? [duplicate]

Possible Duplicate: Get exit code of process that's piped to another I am using the following command line (in a makefile) to pipe the verbose error messages from my compiler through a ...
0
votes
2answers
7k views

clear tmpfs in my case

I am on a Ubuntu machine. I have make a directory under root directory, by: $ sudo mkdir /hello $ sudo mkdir /hello/bye Then I mount tmpfs with size 1024M to /hello/bye by: $ sudo echo "tmpfs ...
0
votes
1answer
12k views

Different ways of using expr command [closed]

I'm trying to learn the bash expr command inside and out. What are some of the most basic to the most creative/tricky/unexpected ways to use the expr command? Small, manageable examples are great.
1
vote
1answer
568 views

Create recovery medium from Windows 7 recovery partition

Many laptops are delivered with Windows 7 recovery partition (but without CD or DVD) which takes place on the harddrive that could contain some Linux distribution or serve for data storage. I don't ...
1
vote
1answer
345 views

Empty typescript file with the script command

In the command line, I typed: script -a myfile Then, I typed the some standard commands. When I opened the myfile using vi, the file was empty. Why is that? And, also, any tips on using the ttyrec ...
8
votes
4answers
624 views

Capturing area of the screen without a Desktop Environment?

I'm running OpenSuse with dwm as a window manager. Since I made the switch from KDE, I haven't found a way to take a screenshot or even capture part of my screen. Is there a way I can do this in a ...
3
votes
2answers
25k views

Finding files containing certain strings under a directory [duplicate]

Possible Duplicate: How do I find text within a file and have it search multiple subfolders? I would like to find out all the files under mydir/ directory whose content contains the string ...
3
votes
4answers
2k views

Why can't I echo the password to fetchmail?

I'm trying to configure a fetchmail. Before I deal with the syntax of fetchmailrc ( I discovered that the level of bugginess of a problem is synergistic with the number of different aspects of the ...
6
votes
4answers
7k views

All commands that should be used to connect to wifi in command line

I would like to switch from gnome to awesome and I would like to connect my wifi network in command line (instead of using gnome tools). So, I searched on the internet and found approximatively the ...
2
votes
2answers
1k views

How do I connect to a new wifi on the command line? [duplicate]

Possible Duplicate: All commands that should be used to connect to wifi in command line I don't need to configure my wifi card or anything. I just want to do the equivalent of a) listing ...
2
votes
0answers
2k views

What good are the signs '-' (minus) in any Linux/UNIX commands? [duplicate]

Possible Duplicate: What does “--” (double-dash) mean? Single dashes - for single-character options, but double dashes -- for words? I was reading the man zip page and I found ...
4
votes
1answer
1k views

How can I generate CMYK images via the command line under Linux?

I have an application I have developed which is generating RGB PNG images with text on them via imageMagic, like so: convert -size 1000x1000 -density 300 xc:white -pointsize 24 \ -fill "rgb(0,0,0)" ...
11
votes
5answers
2k views

Why does mkdir not have the -p flag set by default to allow for nested directory creation?

I see no reason why the -p flag on mkdir should not be set by default. -p, --parents no error if existing, make parent directories as needed It is a non-destructive command from what I can ...
3
votes
2answers
2k views

Move with possible rename

Is it possible to construct a command that will move the file to another directory and if the same file is already there, generate some random string that is not in the name of some file in the ...
23
votes
1answer
44k views

Using --exclude with the du command

This is probably something basic but I'm not able to make it work. I'm trying to use DU to get a total size of files minus certain directories. I need to exclude one specific directory called uploads ...
2
votes
1answer
16k views

How to start nvidia x server settings from command line?

I am using Ubuntu 10.04, I know I can start NVIDIA x server settings by choose : System -> Preference -> Monitors on the top bar. But how can I start the NVIDIA x server settings window by run a ...
4
votes
2answers
2k views

How to install light-weight vim and to be able to efficiently load files into one instance vim?

On my laptop with Ubuntu I'm able to have just one instance of vim, launched with vim --servername VIM After this I'm able to open files from console with vim --remote-silent filename I use ...
1
vote
1answer
247 views

How do I change the path used by the Gnome Command Line applet?

For my shell, I know that I have to modify .bashrc to add my ~/bin directory to the command path, but how do I get the Gnome Command Line applet to use that as a program location too? I'm using ...
1
vote
2answers
176 views

How to change the interpret of a variable in `zsh`?

I set a variable TEMPP='-I ../dir1 -I ../dir2' then I run gcc -M $TEMPP somefile.c It seems not to include ../dir1 and ../dir2 in the search list of the include file, and if there is a space at the ...
1
vote
1answer
2k views

How to use bash control a keyboard

How to use bash command control a Keyboard. e.g. what is a command in bash for pressing ctrl+c, ctrl+l, etc..?
2
votes
1answer
744 views

There is no bash indicator prompt after a forked process terminates

I am reading the book Advanced Programming in the Unix Environment. There is a test program to test the fork function. It works well in my Ubuntu. But what I confused is that why there is no command ...
2
votes
4answers
1k views

Can I pass files between commands?

I am looking for a way to send the resulting file from one comamnd to another, So I dont have to save a copy on disk inbetween. For example, if I have rared files on disk and want to open them I would ...
3
votes
1answer
848 views

Why does unlink(1) support only one file?

I'm used to commands supporting multiple filename arguments if possible, but unlink doesn't: %> unlink a b unlink: extra operand `b' Try `unlink --help' for more information. I ended up using a ...