small programs used on the command line to do a specific job

learn more… | top users | synonyms (1)

12
votes
4answers
17k views

How can I use sed to replace a multi-line string?

I've noticed that, if I add \n to a patter for a substitute using sed, it does not match. Example: $ cat > alpha.txt This is a test Please do not be alarmed $ sed -i'.original' 's/a test\nPlease ...
4
votes
2answers
204 views

What are all the items on the cover of the “Linux Administration Handbook”?

As I mentioned in What do all the pictures on the front of the "Unix and Linux System Administration Handbook" represent? I'm fairly new to Linux and Unix. @jasonwryan provided an excellent ...
11
votes
1answer
648 views

What do all the pictures on the front of the “Unix and Linux System Administration Handbook” represent? [duplicate]

I'm a newcomer to Unix and Linux, and I've been trying to get up to speed on everything. One of the guides I've used is the "Unix and Linux System Administration Handbook" It's a pretty great book, ...
7
votes
4answers
3k views

creating a sequence of numbers, one per line in a file

Is there a way to create out of thin air, a file that is a sequence of numbers, starting at a given number, one per line? something like magic_command start 100 lines 5 > b.txt and then, b.txt ...
7
votes
2answers
10k views

How can I test the encoding of a text file… Is it valid, and what is it?

I have several .htm files which open in Gedit without any warning/error, but when I open these same file in Jedit, it warns me of invalid UTF-8 encoding... The html meta tag states ...
3
votes
1answer
876 views

installing column unix utility on windows

I would like to be able to use the BSD unix utilities: column, join and paste in my Cygwin installation. It seems that they are not available, or I cannot find them. Is there a way to install them so ...
2
votes
1answer
928 views

How synchronize two disks (or folders) using symbolic (or hard) links (like rsync)?

I'm searching a tool or a shell script or another program to synchronize two or more folders or disks. But it differs of rsync tool, because, I don't want to duplicate the missing file, but do a ...
2
votes
1answer
76 views

How to use the -t option of Unix command look

I'm learning the look utility and I don't understand the meaning of the -t option. Can someone show me some examples of it? I read the man page, but still don't know what it exactly means.
3
votes
2answers
102 views

Unatended script execution in ubuntu terminal

I have installed Ubuntu on a VMWare virtual machine. When I got to installing a VMWare tools, I have stumbled upon a simple question: If I execute a script (perl script in VMWare tools case), is ...
5
votes
1answer
136 views

How would one detect if external command exists in a script?

Is there a way to detect if an external command exists (i.e. wget, svn)? More specifically today, i was trying to run one of my scripts i wrote and the person didn't have wget or svn installed. The ...
0
votes
0answers
29 views

Problem with calling program from the command line [closed]

Note: this is a cross post with this post on SO. I am trying to build a command line wrapper in Python 3 for an exiting command line tool called 'spooky' and I am having a hard time understanding ...
0
votes
1answer
192 views

Listing only the files in a folder and inside its subfolders

Is there a linux command for getting only the files in a folder and inside its subfolders? I have used the find command, but it is displaying all the files and folders. I am executing this shell ...
32
votes
4answers
3k views

What is the difference between a builtin command and one that is not?

Is there any intrinsic difference between a builtin command and another command which can nominally do the same thing? eg. Do builtins get "special" treatement? ... is there less overhead running ...
5
votes
1answer
426 views

Can hd and od replace each other?

hd and od are both dump viewers of binary content. Can hd be used wherever od is and vice versa?
1
vote
3answers
567 views

How to determine which executable on my path will be run?

I run which and get the following, brendan$ which python /opt/local/bin/python brendan$ which -a python /opt/local/bin/python /usr/bin/python brendan$ ls -l /opt/local/bin/python lrwxr-xr-x ...
1
vote
0answers
306 views

Validating an OpenSSL Cipher List

Are there any tools that can validate an OpenSSL cipher list both syntactically and semantically? For example, ALL:!LOW:!SSLv2:!EXP:!aNULL is both syntactically and semantically valid cipher list. On ...
1
vote
1answer
433 views

Good “progress bar” about md5sum checking progress?

I'm using this right now: time md5sum -c *.txt | pv | grep -v ': OK$' but aren't there any smart solutions that can list that how many files haven't been checked? I mean I have many md5sum's in ...
4
votes
3answers
414 views

General specification for command line interface

I was wondering where I can find and learn some general idea about the command line interface used in Linux and bash? As to now, I have found pieces of such information only from experience, such as ...
1
vote
3answers
335 views

Sort data on multiple columns

INPUT (unsorted, bad) "XYZ-ZTE-43255 serverB618 agreed","XYZ-ZTE-44432" ,"XYZ-ZTE-43255" "XYZ-ZTE-52775 serverB110 agreed", "XYZ-ZTE-79213 - serverB688 agreed", "XYZ-ZTE-77323 serverB617 agreed", ...
3
votes
2answers
167 views

Why do I get a 'conformability error' when I attempt to convert water in GNU units?

I've been using the GNU units program and I seem to think that I should be able to convert water between a volume and a weight. Examples: You have: 1 gram water You want: cm^3 conformability error ...
5
votes
2answers
1k views

Combine input from multiple files/pipes without clobbering lines or blocking?

Is there a tool that will take input from multiple files or pipes and write it to stdout, without blocking on reads, such that individual input lines come out intact? I basically want to multiplex a ...
1
vote
1answer
2k views

e2fsck progress bar?

How can I see the progress of e2fsck in the terminal? Are there any pv like ways? For example how can I see how far along this command is in progress: e2fsck -f -y -v /dev/sdb1
4
votes
2answers
768 views

Why is bash completion of a symlink different than a directory?

I usually do a find with an environment variable as the path when searching for source code. Recently I replaced my environment variable with a symbolic link, and it broke Bash's shell completion. ...
13
votes
3answers
2k views

Why use superflous dash (-) to pass option flags to tar?

To create a tar file for a directory, the tar command with compress, verbose and file options can be typed thus: $ tar -cvf my.tar my_directory/ But it also works to do it this way: $ tar cvf ...
2
votes
1answer
46 views

Explain the output of -D rates in GNU find

I did ~/pythonsource1/python2.6-2.6.5$ find -D rates . -type d and got Predicate success rates after completion: [need type] -type d [0.4] [280/4350=0.0643678] -a [0.4] [280/4350=0.0643678] ...
2
votes
1answer
434 views

ntop versus mrtg

I'm evaluating tools for measuring network activity and although mrtg seems to be the most highly regarded, I'm really impressed by ntop. Are there any reasons that mrtg is preferred to ntop?
1
vote
1answer
71 views

Good base converter or help using gbase?

Dear all, Could you suggest a good base converter that also does "signed" conversions? Either gbase does not do it, or I can't see how it's done. Any help would be great. What I want to do is give the ...
3
votes
2answers
1k views

How do I time a specific command?

(The linux equivalent of TimeThis.exe) Something like: timethis wget foo.com Receiving foo.com ... wget foo.com took 3 seconds.
14
votes
8answers
1k views

What are the best general purpose programming tools to complement Vim?

I've been using Vim as my text editor for a little while now and I feel like I'm taking the long way to do anything. I use ctags to tag my code base for navigation and I use grep (although ...
7
votes
1answer
334 views

Is there a way to make perl -i not clobber symlinks?

A friend of mine points out that if you do: perl -pi.bak -e 's/foo/bar/' somefile when "somefile" is actually a symlink, perl does just what the docs say it will do: It does this by renaming ...
0
votes
1answer
85 views

Sources to learn about performing certain tasks on command line?

Can someone transform it into community wiki please? I guess I've got no privileges for that. Let's list practical sources for learning about performing certain tasks on *nix command line. E.g. I ...
4
votes
2answers
2k views

wgetpaste alternatives?

Are there any wgetpaste alternatives?
6
votes
1answer
475 views

Difference between references of Linux “utilities”, “commands” and “programs”

I read uses of the word "utilities" for commands/programs such as 'ls', 'chmod', 'mv', etc. Is "commands" is Linux referring to the same things as top, ps, etc., or are those something different? ...
5
votes
1answer
447 views

How to use the ul command line utility

I wanted to answer http://unix.stackexchange.com/questions/3043/use-roff-to-underline-words with "just use ul, this command is meant specifically for underlining text", however I just can't grasp how ...