Tagged Questions

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

learn more… | top users | synonyms (1)

6
votes
3answers
789 views

Lightweight utility/program to run a command after a random delay

I need to randomize the time before a given command starts. I realize it's relatively trivial to do this within a script, or to write a "wrapper" script to do this, but I'm wondering if anyone knows a ...
2
votes
1answer
277 views

rm command returns a message [1] 12345 What does this mean?

I'm trying to remove a file and I keep getting a message similar to: [1] 12345 and nothing happens, I run a directory search (dir) and the file remains and I get a stopped message
14
votes
3answers
5k views

How do I find the window dimensions and position accurately including decorations?

I've been trying to figure out the size of a window for use in a small script. My current technique is using wmctrl -lG to find out the dimensions. However, the problem is this: The x and y figures ...
3
votes
2answers
2k views

How can I automate sending mail using a script?

I have in the past heard of using nail for this task, but I can't seem to find it for my distribution (Ubuntu 11.04) in any of the repositories. What program can I use to one-off emails from a shell ...
1
vote
1answer
1k views

alpine failed to connect to smtp.gmail.com

When I try to send email from alpine I get the following error: Error sending: connection failed to gmail-smtp... (The message disappear before I have the time to copy it). I suspect this is ...
4
votes
4answers
3k views

How to convert to HTML code?

Are there any scripts that can convert between text (e.g. <hi>) and the html entities version (&lt;hi&gt;) like this website does? Or at least a PHP file?
1
vote
1answer
94 views

How do I unset a background in gnome on the command line?

So someone decided to set my gnome background as a practical joke to a rather disturbing picture. However, I don't use gnome and only log into it by accident. I need to remove the picture so when I ...
3
votes
2answers
351 views

What does this Linux command do?

g++ -Wall -I/usr/local/include/thrift *.cpp -lthrift -o something I am new to Linux and am trying to learn "as I go along"....This is from the Apache Thrift website. Also is the -I/usr supposed to ...
2
votes
4answers
222 views

How much disk space does a list of files use

How can I find how much disk does a list of files uses? I'm looking for a variation of du -s *.sql I want to see only the grand total, and with the command above, it always shows a line for each ...
3
votes
4answers
110 views

command for joining a series of files together

I have... me@computer:~/gutenberg/euclid$ ls book01.html book04.html book07.html book10.html book13.html book02.html book05.html book08.html book11.html book03.html book06.html ...
0
votes
1answer
106 views

Video archiving method?

I want to archive family videos, films, etc. I'm currently using: mencoder INPUT.avi -o OUTPUT.avi -ovc x264 -x264encopts bitrate=750 pass=1 nr=2000 -oac mp3lame -lameopts cbr:br=128 I want to ...
11
votes
5answers
4k views

Alternative to find?

Is there an alternative find program with a more conventional CLI interface? find works and expects parameters in a painfully different way from most other utils. Clarification: I'm looking for a ...
7
votes
2answers
2k views

Directory “diff”?

I have two directories which are different versions of the same software package. I'd like to list all the files/directories that have changed between the two then copy those differences to a new ...
1
vote
2answers
183 views

Commandline tool for comprehensive and integrated testing of internet connectivity

Is there a commandline tool for GNU/Linux which will analyse download and upload speed, packet-loss, latency and other factors which will indicate internet connectivity status?
3
votes
3answers
2k views

How to lock on Solaris 10?

On Linux I use flock lock command to execute a command with an exclusive lock. What is the standard operating system command of Solaris 10 to do the same in a shell?
22
votes
3answers
24k views

How to copy the partition layout of a whole disk using standard tools

I want to take a backup of the whole partition layout of a hard drive, including logical drives, so that I can restore that layout to another disk. I do not want to copy the contents of the ...
6
votes
2answers
3k views

using the mail command

How do I use the mail command to check email (and send email) from gmail. Does it support labels? I couldn't have figure out where to put the username and password. I tried to search for instruction ...
1
vote
4answers
287 views

No manual page for regex in section 3 - where is it?

I found What do the numbers in a man page mean? which explains the sections for command/library documentation quite nicely, and I was looking at the output for man regex and noticed the See Also ...
4
votes
1answer
607 views

How to execute shortcut keys from command line?

I am running Gnome. I would like to execute a shortcut key combination from the command line. For example, type a command that generates the key codes for Ctrl+Alt+Left. Does anyone know of a way to ...
4
votes
2answers
2k views

Terminal command vs. GUI drag & drop when copying large no. of files: Any tangible benefit?

I'm finding myself in a terminal more and more often these days as I learn to do certain types of things quicker or more conveniently. However, when it comes to copying a large amount of data (i.e. ...
3
votes
2answers
2k views

Running C Programs on Linux

I watched a video lecture today that introduced C and things like how to make a C program that will run in Linux. I followed the steps given and now I'm stuck with a bit of a problem. I created my C ...
22
votes
5answers
15k views

Split pages in pdf

I have a scanned pdf file which has scanned two pages on one virtual page (page in pdf file). The resolution is with good quality. The problem is I have to zoom when reading and drag from left to the ...
12
votes
5answers
68k views

How to determine Linux kernel architecture?

uname -m gives i686 and uname -m gives i686 i386 output in Red Hat Enterprise Linux Server release 5.4 (Tikanga) machine. I need to install Oracle Database 10g Release 2 on that machine. So, how can I ...
7
votes
3answers
4k views

Show contents of many files

From the command line, what is the easiest way to show the contents of multiple files? My directory looks like below. ./WtCgikkCFHmmuXQXp0FkZjVrnJSU64Jb9WSyZ52b ...
1
vote
3answers
3k views

How to kill a printing job on centOS

How does one kill a printing job on centOS?
2
votes
6answers
324 views

Searching strings on files

I've got a bunch on strings which I need to find in a couple of files, for example: string1 string2 stringn file1.txt file2.txt filen.txt Is there an (easy) way to do that in bash? I need to know, ...
4
votes
3answers
3k views

Gnome Logout from command

How to get logout from Gnome session via command line ? Also Is there any way in GNOME to do "switch user" from command line ?
2
votes
1answer
380 views

Whole program name not visible in nethogs

I'm using the command sudo nethogs to watch network traffic. I have a problem in that the name of the program is too long (it doesn't fit in the PROGRAM column). I haven't found any nethogs ...
1
vote
0answers
329 views

How can I automount devices with no desktop environment? [duplicate]

Possible Duplicate: Replacement for halevt? I've installed Arch Linux on my computer and I'm not using a desktop environment. I just have Openbox window manager installed and bit by bit ...
6
votes
3answers
1k views

Print an SVG from the command line

How can I print an SVG, already scaled to a4 size, from the command line? I tried using lpr, but instead the printer just printed out the actual XML of the file, which isn't what I wanted.
4
votes
1answer
2k views

Resizing and croping images to an aspect ratio of 6x4 with width of 1024 pixels

I have a mixed set of images, each one has a slightly different resolution with a slightly different aspect ratio from other images. I have tried using commands like convert -resize and convert ...
15
votes
1answer
7k views

What do double slashes mean in UNIX path? Is `cd dir/subdir//` valid? [duplicate]

Possible Duplicate: How linux handles multiple path separators (/home////username///file) Do cd dir/subdir/ and cd dir/subdir// mean the same in UNIX? Will the later work out? Else does ...
1
vote
1answer
690 views

Execute a command in a different path

When using Git VCS, I execute all of the git commands on the directory that contains a .git repository. I want to execute a git-pull through an SSH trigger but how do I define the path to the ...
7
votes
2answers
724 views

What is a good way of saying “run this after 15 minutes” on a shell?

I use this sleep 900; <command> on my shell. Just wanted to know is there is some alternate/better way that you use?
3
votes
4answers
507 views

Send file to opened editor using command line

Recently I found out a new very useful command. It is: gnome-open or xdg-open or just open on mac. It opens file or directory in by default specified program. But, in the event ...
17
votes
2answers
7k views

Is it possible to save as sudo from nano after you've forgotten to run as sudo?

A lot of the time I edit a file with nano, try to save and get a permission error because I forgot to run it as sudo. Is there some quick way I can become sudo without having to re-open and re-edit ...
9
votes
4answers
15k views

pdf to jpg without quality loss; gscan2pdf

When I convert a pdf file to bunch of jpg files using convert -quality 100 file.pdf page_%04d.jpg I have appreciable quality loss. However if I do the following, there is no (noticeable) quality ...
19
votes
4answers
987 views

What should I use when cut doesn't cut it?

I have a file cities like this: [1598] San Diego, US (inactive) [4517] St Louis, US (inactive) [6346] Orlando, US (inactive) I want to cut out the city names, so that I have: San Diego St Louis ...
5
votes
2answers
372 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?
1
vote
1answer
243 views

Pressing `up` to get the previous command in a tty on Ubuntu Server

I've installed Ubuntu Server 10.10, and when I press up in a terminal nothing happens. Using Ubuntu Desktop it gave me the previous command that I ran. How can I make it do this in Ubuntu Server as ...
74
votes
2answers
19k views

What does “--” (double-dash) mean? (also known as “bare double dash”)

I have seen -- used in the compgen command. For example: compgen -W "foo bar baz" -- b What is the meaning of the --.
31
votes
7answers
5k views

Linux tools to treat files as sets and perform set operations on them

Does anyone know of any linux tool specifically designed to treat files as sets and perform set operations on them? Like difference, intersection, etc?
7
votes
2answers
366 views

Command-line software for playlist syncing to Android Phone?

I'm looking for a way to sync music to my Android Phone without having to load something like banshee. I know there are plenty of ways to sync files, but I'm interested in syncing playlists and having ...
14
votes
7answers
8k views

diff within a line

I have some sql dumps that I am looking at the differences between. diff can obviously show me the difference between two lines, but I'm driving myself nuts trying to find which values in the long ...
1
vote
5answers
229 views

What horrible mistakes should I avoid as a newb? [closed]

Edit - please see this duplicate question. I just chowned -R my /usr folder, which totally corrupted my computer (not sure how, but I lost sudo power eventually). This seems like a horrible newb ...
3
votes
1answer
400 views

Multiple renaming files [duplicate]

Possible Duplicate: How to clean up file extensions? I'd like to rename files with extension .flac.mp3 to extension .mp3. I used the following command $ for i in *; do mv $i `echo $i | sed ...
3
votes
2answers
649 views

How do I execute a script later?

I need to compile gcc45 on my computer and that's a lengthy and resource-intensive process for my computer, so I'd prefer to have it do it while I sleep (at night). What's the closest thing to: $ ...
3
votes
1answer
230 views

ssh behavior for root and non-root user

When I ssh as root to a remote machine, the command output looks like this: root@Machine:/current/path#: However, if it's a non-root user, all I see is: $ How can I get the same behavior as for ...
8
votes
7answers
10k views

How do I install a PHP CLI with a usable interactive prompt on Debian Wheezy?

When I install php5-cli on Debian Wheezy (currently testing), the interactive prompt is very unusable due to missing readline support (bug 341868). What's the easiest way to install a version linked ...
25
votes
6answers
30k views

Where do files go when the rm command is issued?

Recently I accidentally did rm on a set of files and it got me thinking where exactly these files end up? That is to say, when working with a GUI, deleted files go to the Trash. What's the equivalent ...