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

learn more… | top users | synonyms (1)

18
votes
7answers
4k views

How to understand what's taking up space?

I'm looking for a linux alternative to WinDirStat. I would like to know what is taking up space on my hard drives. A program that works on console and doesn't require a UI is preferred .
4
votes
1answer
505 views

Quick way to host a webserver on localhost

I'd like to make the contents of a folder available at http://localhost:PORT/, temporarily. A very basic http server. I already know about, $ python -m SimpleHttpServer or ( this seems like the ...
20
votes
4answers
3k views

How do I send stdin to the clipboard?

Is there functionality in unix that allows for the following: echo "Some Text" | copy-to-clipboard
2
votes
1answer
150 views

How do I view files as a tree structure?

I would like to view files exactly like I can view proccess using pstree. So is there something like: treeview --maxdepth 2 that would give me what I need?
1
vote
1answer
469 views

CH3MNAS Fun Plug and NZBget. Cannot launch NzbGet 0.7, word unexpected

I have un-tarred the nzbget0.70 debug version and have put it in the /ffp/bin dir. and I have a config file in the /ffp/etc/ dir but when I try to run it, I get the following: ...
9
votes
4answers
9k views

How can I make a program executable from everywhere

What should I do if I want to be able to run a given program regardless of my current directory? Should I create a symbolic link to the program in the /bin folder?
4
votes
1answer
108 views

What is this construct in bash? mycommand(){dosomething;}

I actually found following one-liner on commandfu.com: cmdfu(){ curl "http://www.commandlinefu.com/commands/matching/$@/$(echo -n $@ | openssl base64)/plaintext"; } I have not come across a similar ...
15
votes
4answers
16k views

Understanding the exclamation mark (!) in bash

I used history | less to get the lines of previous commands and from the numbers on the left hand side I found the line I wanted repeated (eg. 22) and did !22 at the command prompt and it ...
3
votes
2answers
383 views

I need help with a cronjob to watch for runaway processes and kill them

I have an interesting situation, I have a runaway ruby process - I know exactly how I trigger it. Point is, it got me thinking about runaway processes (CPU usage or memory usage). How would one ...
6
votes
3answers
688 views

Deleting lots of files

I accidentally created 8 million files and every time I'm trying to delete them the server almost dies because of the rm process eating all disk IO (the server is remote without console). Should ...
25
votes
3answers
26k views
3
votes
2answers
914 views

Difference between wget versions

I have problem with wget behavior for 1.10 and later versions. I am using wget to download a report from my app. version 1.10.2: >wget-1.10.2.exe --http-user=trader --http-passwd=trader ...
1
vote
1answer
98 views

How can I create a file that just contains a binary number?

I would like to create a file that just contains a binary number. I think that touch can be used to create an empty file, but is there any way I can fill it with a binary number e.g. 10 (ten)? And how ...
2
votes
1answer
825 views

How can I check the Base64 value for an integer?

I would like to check the Base64 value for an integer. There is a base64 linux command but I don't understand how I can apply it on integers. I have tried with base64 10 but then I get the error ...
5
votes
4answers
221 views

How could I simplify this command to only use awk?

awk '/user/ {print $1 }' /etc/userdomains | sed 's/://' the format of /etc/userdomains is domain.tld: user otherdomain.tld: otheruser
8
votes
2answers
665 views

How do I take a list and remove it from a file?

I have a long list of domain names that I need to remove from /etc/remotedomains. They're probably not in any particular order in the file. Each domain is on one line. How could I iterate through the ...
6
votes
3answers
8k views

Grabbing the first [x] characters for a string from a pipe

If I have really long output from a command (single line) but I know I only want the first [x] (let's say 8) characters of the output, what's the easiest way to get that? There aren't any delimiters.
3
votes
1answer
6k views

How to increase the TTY fontsize?

I have a fedora machine, I am used to working on CLI since I had CRT monitor, after switching to TFT - the experience is not the same I had with CRT, the font is smaller now. How to change it?
7
votes
6answers
5k views

Modifying PDF files

I need to do some basic editing on existing PDF file. I.e. I need to: Add chapters/bookmarks Change some page numbering However I cannot find any tool - GUI or commandline - which would offer this ...
1
vote
1answer
913 views

vnc connection working with PuTTY but not with command line

I am using PuTTY to connect to a distant network to then set up x11vnc and then using ssl/sshvnc as a client. in the host name for PuTTY I have: ssh.inf.uk and port: 22 in the ssh tunnel options I ...
3
votes
6answers
576 views

How do I find a command if I don't know its name?

As a Unix beginner, I often find myself wanting to know the name of the command that achieves a particular function I'm after. How can I go about finding out the name of the command, given a ...
5
votes
1answer
807 views

How to get a persistent “history”-file even after a non-clean shutdown?

I am trying Ubuntu Server 10.10 in VirtualBox. I like that the commands I run is saved in a "history"-file that can be shown with the history command. But if I just turn off VirtualBox without the ...
3
votes
1answer
851 views

Montage together five gifs

I have five gifs all with the same number of frames and the same framerate. Is it possible to montage these together into one gif where each frame is similar to a normal montage of static images and ...
5
votes
5answers
420 views

How can I reproduce commands run on one machine on another machine?

I would like to install some software on a linux-machine that I have run in VirtualBox. Then I would like to do the same thing on a linux-VPS. I think that I can save all commands that I run using ...
11
votes
7answers
8k views

grep and tail -f?

Is it possible to do a tail -f (or similar) on a file, and grep it at the same time? I wouldn't mind other commands just looking for that kind of behavior.
0
votes
1answer
1k views

What strings should I look for in /var/log/auth.log?

I wrote a bash command to scan /var/log/auth.log for messages occurring on the current day indicating unauthorised access. Currently it just fetches messages matching BREAK-IN and unauthorized. What ...
5
votes
5answers
7k views

how do I add newlines between lines printed on the command line?

Mail logs are incredibly difficult to read... how could I ouput a blank line between each line printed on the command line. For example say, i'm grep-ing the log. That way multiple wrapped lines ...
17
votes
7answers
2k views

Command-line-friendly full-text indexing?

Is there such a thing as a full-text indexing engine, that can be queried from the command line and ideally wouldn't require using a gui at all ? I'm especially interested in indexing my ebooks and ...
8
votes
2answers
9k views

What does ^d mean in ls -l | grep ^d?

When I do ls -l | grep ^d it lists only directories in the current directory. What I'd like to know is what does the caret ^ in ^d mean?
21
votes
4answers
4k views

How to echo a bang!

I tried to create a script by echo'ing the contents into a file, instead of opening it with a editor echo -e "#!/bin/bash \n /usr/bin/command args" > .scripts/command The output: bash: ...
5
votes
1answer
406 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 ...
1
vote
2answers
724 views

How can I shutdown after unmounting a USB device from the command line?

Previously, I asked this question about how to suspend Linux after a set amount of time. I would like to ask a similar question. Supposing I have a USB device attached to my system (OS = Fedora 13), ...
16
votes
5answers
14k views

How do I convert an epoch timestamp to a human readable format on the cli?

How do I convert an epoch timestamp to a human readable format on the cli? I think there's a way to do it with date but the syntax eludes me (other ways welcome).
4
votes
2answers
3k views

Is there a way to empty the trash/wastebasket from the command line?

This would be great especially considering the latest version of Ubuntu is very slow when displaying directories on my PC...
11
votes
3answers
3k views

Sunrise and other astronomical data from the command line

Is there a simple open-source, command-line program that can show the sunrise and sunset times at a given date and location, and perhaps moon and planet data as well? Browsing the Debian package ...
5
votes
1answer
2k views

Show a notification across all running X displays

Using the command line, I'd like show a notification on every running X display. ( and running console ) Something like: notify-send-all 'Warning' 'Nuclear launch in 5 minutes, please evacuate' Is ...
18
votes
1answer
12k views

What is the difference between modify and change in stat command context?

The stat command's manual page says: %x Time of last access %y Time of last modification %z Time of last change I am unable to understand what is the difference between ...
17
votes
4answers
11k views

How to redirect output of wget as input to unzip?

I have to download a file from this link. The file download is a zip file which I will have to unzip in the current folder. Normally, I would download it first, then run the unzip command. $ wget ...
6
votes
2answers
2k views

Getting and setting screen size for Xorg

I would like to run a command like get-screen-resolution during a X session to get a '800x480' output. ( or whatever the actual screen size is ). Is there something available for this? Currently I ...
6
votes
1answer
420 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? ...
8
votes
3answers
593 views

how to queue a command to run after another command finishes?

Sometimes I start a program that takes a very long time to finish (emerge), then realize that I should go to bed instead of waiting for it. If I know this in the first place I would run program; halt ...
2
votes
3answers
1k views

how to pass the result of `find` as a list of files?

The situation is, I have an MP3 player mpg321 that accepts a list of files as argument. I keep my music in a directory named "music", in which there are a few more directories. I just want to play all ...
35
votes
5answers
12k views

How can I move files and view the progress (e.g. with a progress bar)?

When moving large directories using mv, is there a way to view the progress (%)? The cp command on gentoo had a -g switch that showed the progress.
6
votes
3answers
1k views

Command line join of password protected wireless networks in Ubuntu, Arch Linux, or other distros?

Is there a way to join a password protected wireless network via the command line in installations of Ubuntu or Arch Linux with no desktop environment or any GUI installed? Also, could this be done ...
7
votes
1answer
3k views

How do I merge two *.srt files

Please see this question. I have just merged two avi files cd1.avi and cd1.avi into movie.avi using: avimerge -o movie.avi -i cd{1,2}.avi Problem is that I had to subtitle files linked to the ...
11
votes
3answers
13k views

How do I put a hat on 'e' (ê)?

Since I've migrated to linux a few years ago, one issue still remains. The ê character features a lot in my "moeder taal" (home language). In Windows making the character was easy, I simply had to ...
9
votes
4answers
5k views

How do I merge two *.avi files into one

I have two *.avi files: sequence1.avi sequence2.avi How do I merge these two files using a command-line or GUI?
6
votes
3answers
11k views

How do I count the number of occurrences of a word in a text file with the command line?

I have a large JSON file that is on one line, and I want to use the command line to be able to count the number of occurrences of a word in the file. How can I do that?
10
votes
3answers
6k views

copy recursively except hidden directory

How do I copy recursively like cp -rf *, but excluding hidden directories (directories starting with .) and their contents?
2
votes
1answer
249 views

How to save temp data

updated: I'd like to save a large amount data ( ~ 100MB ) from the standard input in temporary location for the duration of my bash session. Piping it to a file won't work as I have only 30MB of ...