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

learn more… | top users | synonyms (1)

7
votes
6answers
3k views
0
votes
1answer
111 views

Why does the factor command produce nonsense on an RSA modulus?

Ok, so I think I may have found a flaw in... something. I honestly don't know. This is such a weird scenario. I was attempting to break very small asymmetric (RSA) encryption, just as a Proof of ...
0
votes
0answers
11 views

Bash wrapper keeping logs of each command give or take a UI-like experience

Is there any tool that provides the ability to execute a series of bash commands (think cloud server setup), keeping a formatted log of each command along with its output? It would be somewhere ...
1
vote
0answers
20 views

Does anyone use Netem anymore? Alternatives?

When simulating an IP network you can use Linux built-in network emulator Netem. Together with bridge-utils of course. Simulating packet drop, duplicate packets, jitter et cetera. Is anyone using ...
19
votes
4answers
2k views

Can a file that was originally sparse and expanded be made re-sparse

I know that copying or transferring what was originally a sparse file without using a utility that understands sparse files will cause the 'holes' to be filled out. Is there a method or utility to ...
33
votes
2answers
3k views

Why use install rather than cp and mkdir?

I've seen in many places used install -d to create directories and install -c to copy a file. Why not use mkdir and cp? Is there an advantage in using install?
16
votes
5answers
956 views

How to trick a command into thinking its output is going to a terminal

Given a command that changes its behaviour when its output is going to a terminal (e.g. produce coloured output), how can that output be redirected in a pipeline while preserving the changed behaviour?...
82
votes
8answers
116k views

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

I've noticed that, if I add \n to a pattern for substituting 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 ...
1
vote
2answers
32 views

How to use cloc to find lines of code in a debian package

cloc - statistics utility to count lines of code Now the manpage mentions that it can be used to count lines of code of a tarball cloc perl-5.10.0.tar.gz Now a debian package is just like a ...
36
votes
3answers
140k views

How to “List Disk” in Linux

In Windows, all you have to type is "List Disk" using DisPart in a command prompt and it'll list all physical storage devices available, their size, format, etc. How do I do this in Linux?
0
votes
2answers
98 views

How do I install `gresource` on Fedora?

I'd like to change the background image of my login screen (Fedora 23, GNOME desktop). The Arch wiki has a write-up on how to do it. Basically it involves extracting the .gresource binary that lives ...
0
votes
0answers
256 views

What's the problem with fsck.ext3?

It seems there is some problem with my HDD in my satellite box. The box records to and plays video from the HDD, but occasionally it hangs (it was stable before). It's Linux version 2.6.32....
0
votes
0answers
13 views

Labeling error messages

When dealing with errors, utilities often print their name followed by the error message, for example, sed, cat, awk, etc. sed: foo: No such file or directory Others print the word fatal, followed ...
0
votes
0answers
14 views

Dynamic port scanning

I know how to do a "static" port scan with nmap, however while I have certain processes running I would like to do a dynamic port scan to see what ports these processes open for assurance that the ...
0
votes
1answer
67 views

Why is the rename utility on Debian/Ubuntu different than the one on other distributions, like CentOS?

On CentOS, the rename command uses two simple strings, from and to. rename from to file... while on Debian/Ubuntu it uses a perl-style regular expression. rename [ -v ] [ -n ] [ -f ] perlexpr [ ...
3
votes
1answer
99 views

free command output: gentoo (redhat?) vs debian

I noticed there is a difference between outputs of free command: On debian: $ free -h total used free shared buffers cached Mem: 4.0G 3.4G ...
0
votes
0answers
16 views

Different regex engines and syntax in unix tools like grep, find, vim, sed, aptitude etc [duplicate]

I would like to learn and use regex more. I made couple tutorials and trying use regex in everyday tasks. But I've found thing that demotivates me and slowing learning process - different syntax/...
9
votes
3answers
4k views

Are there alternatives for `dd`?

What other tools should I use to read and write files with truncation, seeking and skipping. dd's command line options seem inconvenient and foreign and I don't like choosing between slow, but precise ...
174
votes
3answers
46k 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 --.
3
votes
2answers
9k views

List of available command options?

I'm currently setting up my first web server without a control panel and so far things are going pretty good! I was just wondering if anyone could direct me to somewhere that explains all of the ...
1
vote
1answer
28 views

Packages and the like for configuring new systems [closed]

I'm faced with the prospect of moving from a server which has been configured previously with loads and loads of the sorts of tools you forget about day-to-day as you do various tasks (I'm talking ...
1
vote
1answer
47 views

Is there any text search tool preloaded with well-known regexes?

I would like to know if there is any command line tool to search text files preloaded with some well-known regexes (IP, email, date, path, url, xml tags, etc) so you could do something like: grep -A ...
1
vote
1answer
38 views

Looking for an external command that can do the same thing as echo

echo is bash builtin. Is there an external command which can do the same thing as echo? (may do more)
1
vote
1answer
16 views

How can I make fullscreen cross hairs appear centered on the pointer?

How can I make fullscreen crosshairs, centered on the mouse, appear on my screen? I read a lot of science papers with graphs that I want to quickly be able to see what feature is horizontal/vertical ...
38
votes
14answers
15k views

A standard tool to convert a byte-count into human KiB MiB etc; like du, ls1

Is there a standard tool which converts an integer count of Bytes into a human-readable count of the largest possible unit-size, while keeping the numeric value between 1.00 and 1023.99 ? I have my ...
2
votes
2answers
247 views

Is there any way to hide kernel threads from ps command results?

When I type ps -ef , there are lots of special kernel thread processes showing. I am not interested in kernel threads; I am only interested in user process/thread. Is there a way that I can hide the ...
18
votes
3answers
1k views

What is the purpose of square bracket executable

I see there is an executable called "[" in /usr/bin. What is its purpose?
1
vote
3answers
109 views

It is a good idea to download the default Linux utilities?

I am working on a server environment which has almost no executables in its /bin folder, except for some basic ones like ls and ln, but I want other common binaries (like sed, awk, gcc etc.) to be ...
4
votes
2answers
47 views

log of open and close time of a program

I want to get the total time a program was run daily for personal logging (from start to close even if it is in the background). For example: Firefox. Is there a system log that keeps track of open ...
46
votes
9answers
12k 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?
5
votes
5answers
1k views

Where is the log of used commands in Linux?

In Linux, generally we use a lot of commands and it is difficult to remember all of them. history command provides the list of commands we used previously but its limit is less. New commands are ...
0
votes
0answers
27 views

What utilities will allow me to see how much network data a process has used in a session?

I need to know how much network data each program/process are using on my machine. There are great tools (like nethogs) to give me information on current usage. However, it does not give me ...
1
vote
3answers
493 views

running an executable in parallel by dividing the input directory tree

Commands like find and grep would benefit greatly if they were to run in parallel. Is there a utility or a program that takes a command as an argument and makes it run in parallel by running multiple ...
1
vote
1answer
45 views

Why doesn't cc (the C compiler) and similar utilities use standard streams by default? [closed]

Background If think most of us agree that filters and pipes are the very foundation of Unix systems. Pipes and filters are very powerful tools. Almost all Unix utilities use the standard input and ...
6
votes
2answers
6k views

file block size - difference between stat and ls

I've noticed that when I do a: ls -ls file It provides block count, say 8 blocks. When I do: stat file I notice that the block count is 16, twice the number given by ls. The block size on my ...
27
votes
4answers
10k views

Fix or alternative for mktemp in OS X

I'm looking at a bash script someone else wrote that uses mktemp: TEMP=`mktemp --directory` However, this line does not work on my machine (OS X 10.6). How would I fix this line so that it is ...
1
vote
1answer
10 views

gnupg: set subkey expiration date in the past

I would like to set the expiration date of a GPG subkey in the past, but gpg --edit-key does not allow me to. Is there any workaround to that? Rationale: it is useful to set the expiration date of a ...
2
votes
3answers
588 views

Why are file names surrounded with “â” sign?

After adding alias rm='rm -i' to my ~/.bashrc file (because, when I removed a file, it wasn't asking for confirmation), file names are surrounded with "â" signs as in the example below: rm: cannot ...
12
votes
4answers
14k 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 ...
8
votes
2answers
561 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 ...
3
votes
2answers
1k views

Check files for conventions

I need a script that checks and lists all text files for project conventions. With conventions I mean for example: UTF-8 encoding No trailing white spaces Newline at the end of file No not-ascii ...
0
votes
1answer
201 views

Installing the BlueZ Utilities

I need to install the bluez utilities. On this site there are listed six utilities in a table, so I downloaded the latest bluez package bluez-5.33.tar.xz and extracted it. But how can I install these ...
0
votes
1answer
244 views

Password protect a PDF file with AES 256

I can't find a free/open-source software that password protects my PDFs with AES 256. pdftk just offers 128-bit strength.. In fact I didn't find any other tool that encrypts PDFs. What tool may I ...
5
votes
1answer
95 views

Why do some utilities parse operands before options?

According to several sources, the UNIX utility guidelines specify that operands should always be processed after options: utility_name[OPTIONS][operands...] Some older UNIX utilities are known to ...
4
votes
2answers
2k views

wgetpaste alternatives?

Are there any wgetpaste alternatives? As a clarification... wgetpaste is an extremely simple command-line interface to various online pastebin services. The basic usage is to simply upload a ...
0
votes
1answer
70 views

Languages to use for console tools - Go, Rust, Javascript? [closed]

I'm planning to write a data cruncher command line tool, I'm considering Go, Rust and Javascript. But I'm afraid of jeopardising the project by using something not stable enough or painful to deploy. ...
9
votes
2answers
1k 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?
68
votes
3answers
27k views

What is the difference between curl and wget?

I am keen to know the difference between curl and wget. Both are used to get files and documents but what the key difference between them. Why are there two different programs?
7
votes
2answers
5k views

I try to add passwords to the “pass” password manager. But my attempts fail with “no public key” GPG errors. Why?

I am trying to install Pass: the standard Unix password manager, however, when I try to add passwords to the appliation I get these errors gpg: Kelly's Passwords: skipped: No public key gpg: [stdin]: ...
5
votes
1answer
452 views

Understanding the output of the “who -a” command

I ask this question because, while there are many answers on the internet showing that "who -a" is an option, nobody explains how to read the output. If you can provide a link to an online site that ...