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

learn more… | top users | synonyms (1)

65
votes
8answers
94k 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 ...
0
votes
0answers
22 views

Infrastructure Documentation tool [on hold]

Is there any open-source tool that can be used for IT hardware infrastructure documentation with some additional services such as automatic updates for new hardware , mutual dependencies , networking ...
35
votes
14answers
12k 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
49 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 ...
15
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
104 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
40 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 ...
43
votes
9answers
10k 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?
1
vote
0answers
56 views

Most common high level language? [closed]

Suppose I want to write a *nix utility. Furthermore, I don't want to write it in C or C++, because those are out of my skill set, and I don't want to write it as a shell script, because I want some ...
5
votes
5answers
947 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
21 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 ...
16
votes
4answers
719 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 ...
0
votes
1answer
36 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 ...
1
vote
3answers
418 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
38 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 ...
5
votes
2answers
5k 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 ...
0
votes
0answers
11 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 ...
23
votes
4answers
8k 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
9 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
320 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 ...
10
votes
4answers
12k 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
529 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
851 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
116 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 ...
15
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 ...
0
votes
1answer
107 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
79 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 ...
1
vote
1answer
46 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. ...
8
votes
2answers
843 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?
64
votes
3answers
23k 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?
6
votes
2answers
4k 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
372 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 ...
7
votes
2answers
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 ...
11
votes
7answers
15k views

How do I find the X window ID under the mouse pointer in bash?

From a bash script, is there some way to get the ID of the X window under the mouse pointer? (edit) I need the process to be non-interactive.
26
votes
2answers
84k 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?
1
vote
1answer
353 views

how to use ser2net control port

man ser2net says that by running ser2net with a -p flag I can execute a number of commands. If I run ser2net -p 12345 and, then, lsof -i :12345, I can see the service on that port. How would I, for ...
1
vote
3answers
234 views

Interactive cd (directory browser)

Sometimes when working in deeply nested file hierarchies (e.g. Java code) I find it annoying to traverse from one leaf to another. My usual cd-up looks like: $ cd ../../.. # Oops, not enough $ cd .. ...
3
votes
2answers
49 views

nm program - why such name?

Where does the name of nm come from? The IEEE standard defines nm as: nm - write the name list of an object file Is nm an abbreviated form of word name/names? Or does it have a completely ...
5
votes
2answers
3k views

What does chmod stand for?

In order to memorize a command, it is usually a good idea to learn where it's name comes from. For example, cp comes from copy. usermod means "User Modifiy" (at least I guess so). Where does chmod ...
1
vote
0answers
33 views

TUI Tool to change directory permission rules?

There are some strangers to Linux who need to use it in terminal mode but they are helplessly limited to accept that using chmod and chown is dead simple. They would be satisfied only by a tool that ...
2
votes
2answers
50 views

Log new files in a directory

Is there a tool, which lets me know about the last newly created files? The still common way of using a hierarchically file system makes it hard to save files in different places, so sometimes I sort ...
1
vote
1answer
68 views

Is there a tool that automatically inserts and updates a script header block for e.g. shell or Python scripts?

I found scripts by a former admin who scripted quite nice things with Bash or Python. All his scripts are well formatted and equipped with a always similar looking "script header" or "code header", I ...
0
votes
2answers
324 views

sponge from moreutils - what's the difference to shell redirect? useful examples?

> brew install moreutils ==> Downloading https://homebrew.bintray.com/bottles/moreutils-0.55.yosemite.bottle.tar.gz ...
3
votes
2answers
237 views

How to read lsusb?

What is the vendor id and what is the product id in the output of lsusb? ➜ lsusb Bus 001 Device 018: ID 0781:5576 SanDisk Corp. Bus 001 Device 011: ID 0e0f:000b VMware, Inc. Bus 001 Device 001: ID ...
8
votes
3answers
2k 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 ...
0
votes
0answers
99 views

How to check if Nginx + Ruby on Rails web application is down?

I am very new to *nix system. I have below setup: OS - Ubuntu 14.14 Web Server - Nginx with Passenger Web Application Ruby on Rails web application Please tell me what tools to use to achieve: ...
8
votes
2answers
651 views

Finding a file type assuming wrong extension

I have an image archive I keep up. Sometimes, the sites I pull them from reformat the file while keeping the extension the same, most often making PNG images into JPG's that are still named ".png". ...
0
votes
2answers
48 views

Tool for managing local development repositories [closed]

I'm a web developer and I work with various languages and projects (who doesn't?). I've cloned many of these projects/repositories locally to various directories. Now, with dozens of projects cloned ...
5
votes
0answers
152 views

What are the differences between xdotool and xautomation?

xdotool and xautomation are two command line X11 automation tools. I've used the former for a while and only recently found out about the existence of the latter, and I'm curious to know what someone ...