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

learn more… | top users | synonyms (1)

6
votes
2answers
5k views

How do I insert a space every four characters in a long line?

I've got a long line that I want to insert a space every 4 characters, on a single lone line of solid text to make it easier to read, what's the simplest way to do this? also I should be able to input ...
9
votes
1answer
605 views

Is there any env variable to turn --color (and the like) on for all commands?

I do use aliases to turn on color for some commands by default. But I'm wondering if there's an easier way at telling my system, color is supported, don't make me use --color for grep, ls, etc.
4
votes
2answers
2k views

wgetpaste alternatives?

Are there any wgetpaste alternatives?
10
votes
5answers
2k views

How do I recursively check permissions in reverse?

There's a command, I think it comes with apache, or is somehow related to it, that checks permissions, all the way down. So if I have /home/foo/bar/baz it will tell me what the permissions are for ...
13
votes
1answer
2k views

What protocol/standard is used by terminals?

I was wondering how the "GUI" of a command line application is communicated over a network. Most of the time, it's quite simple (plain text / input) but sometimes it's more complex (aptitude). Is it ...
-1
votes
2answers
4k views

How to delete a file in Arch console?

pacman stopped working and asked me to delete a file if "another package manager isn't working". What is the file for deleting files?
5
votes
2answers
5k views

Adding an empty line at the end of input

I have some command which produces output with no new line at the end, like this Myprompt$ somecmd dksfjdl dsfjdlkfj dsfjdkfj dfjdkfjMyprompt$ Currently I overcome this by somecmd | sed 's/$/\n/' | ...
159
votes
5answers
9k views

What's the difference between $(stuff) and `stuff`?

There are two syntaxes for command substitution: with dollar-parentheses and with backticks. Running top -p $(pidof init) and top -p `pidof init` gives the same output. Are these two ways of doing the ...
3
votes
1answer
5k views

cURL access HTTPS website

I trying to access the following site with cURL. (https://www.fleetagent.be) I have cURL configured with the following switches -L -k --proxy [username:password] I get the following error. What ...
3
votes
1answer
2k views

Appending text to end of a textfile

How can I append a new line to a text file followed by current date and time?
6
votes
1answer
29k views

How do I get sar to show for the previous day?

on our servers, typing sar show's the system load statistics for today starting at midnight, is it possible to show yesterdays statistics?
10
votes
3answers
971 views

Lowercasing all directories under a directory

I want to lowercase every directories' name under a directory. With which commands can I do that?
7
votes
1answer
1k views

Suggestions for a command line IRC client that supports downloads?

It's been awhile since I've used IRC and the last time I did was on a windows system with mIRC. I'm interested in finding a command line client that supports downloads and some degree of automation ...
6
votes
2answers
2k views

Invoking pushd in a shell script

I have a simple script that I want to invoke 'pushed' followed by another command. But the 'pushd' command inside the script doesn't seem to stick past the script. What's a way to make this execute ...
14
votes
2answers
2k views

How can I count the number of different characters in a file?

I would need a program, that outputs the number of the different characters in a file. Example: > stats testfile ' ': 207 'e': 186 'n': 102 Exists any tool, that do this?
2
votes
1answer
271 views

Open a command line window in GNOME Desktop

In GNOME Desktop, when I type /usr/bin/firefox, the Firefox browser will open. How can I open a command line window in the same way?
21
votes
8answers
12k views

Which mp3 tagging tool for Linux?

Which app would you recommend for Linux to tag MP3s? Under Windows I used to use tag&rename and liked it a lot; it works well under Wine, but I want something that runs natively
9
votes
7answers
5k views

How do you bulk move files up one directory safely?

How can I move files up a directory where there might be hundreds or thousands of files in the directory, and you might not be sure about whether there are dupes in ... What method would you use? How ...
1
vote
1answer
279 views

Commandline e-mail client that syncs contacts with external server?

I am planning to setup a groupware server that's either Citadel or SOGo, which supports the GroupDAV, CardDAV, or SyncML protocols. Is there a commandline e-mail client that supports syncing contacts ...
2
votes
3answers
826 views

How do I use redirection with sudo [duplicate]

Possible Duplicate: Redirecting stdout to a file you don't have write permission on Yeah I could (and probably will) just escalate to root, but I'd like to know why this doesn't work? ...
6
votes
5answers
8k views

How to pass the output of one command as the command-line argument to another?

So I have a script that, when I give it two addresses, will search two HTML links: echo http://maps.google.be/maps?saddr\=$1\&daddr\=$2 | sed 's/ /%/g' I want to send this to wget and then save ...
5
votes
3answers
293 views

Searching a text file with a single line using regular expressions

as far as i know all unix text processing utilities are reading one line at a time and performing one action on this line. I have a huge file with a single line of text which contains several tokens ...
47
votes
10answers
18k views

how do you sort du output by size?

How do you sort du -sh /dir/* by size? I read one site that said use | sort -n but that's obviously not right. Here's an example that is wrong. [~]# du -sh /var/* | sort -n 0 /var/mail 1.2M ...
9
votes
1answer
2k views

Searching for a command line tagging tool for mp3 and ogg that supports pictures

I am searching a command-line tagging tool that supports ogg- and mp3-tagging and allows to add a picture to the tags. Currently I use lltag but that does not support pictures. dagger is the tool I ...
5
votes
3answers
7k views

Storing output of command in shell variable

I have an operation using cut that I would like to assign result to a variable var4=echo ztemp.xml |cut -f1 -d '.' I get the error: ztemp.xml is not a command The value of var4 never gets ...
4
votes
4answers
1k views

Copy text from one terminal into another

I am logged into ssh to a university account from my home computer. Then I find a file that I want to copy onto my local system. So I open a new shell terminal and am about to use scp to copy that ...
6
votes
5answers
12k views

count lines in a file

I'm sure there are many ways to do this: how can I count the number of lines in a text file? $ <cmd> file.txt 1020 lines
10
votes
5answers
3k views

How to shut down the computer after a task has been completed?

I usually start a download before I go to school. Which command should I use to automatically make the necessary saves and turn off the computer after a particular task has been completed? (Say, ...
23
votes
4answers
17k views

Why do we use “./” to execute a file?

Why do we use ./filename to execute a file in linux? Why not just enter it like other commands gcc, ls etc...
14
votes
5answers
6k views

What is the difference between ls and l?

I accidentally typed l instead of ls today and found that the command still printed a list of the files in my current directory. Trying l --help brings up the help file for ls suggesting that l is ...
2
votes
6answers
2k views

truncating file names

I have a folder that has a number of files all of a similar form as: Dropkick Murphys - 01 - Walk Away.mp3 Dropkick Murphys - 02 - Workers Song.mp3 And so forth... I want to convert them all so ...
9
votes
2answers
751 views

Change directory without typing cd?

Is it possible to make bash change directory in command line simply by typing that directory without any commands like cd? For example is it possible instead of writing this: $ cd /tmp I just want ...
5
votes
2answers
2k views

sort output by column

I'd like to take this command find -maxdepth 1 -type d | while read -r dir; do printf "%s:\t" "$dir"; find "$dir" | wc -l; done ( from here ). which has an output of basically ./kennel: 11062 ...
28
votes
8answers
16k views

Markdown Viewer

I found a file formatted with Markdown. Could you guys suggest what viewer that I could use to view this type of files? Hopefully one without gui (if it's possible) Update I was actually looking for ...
2
votes
4answers
261 views

How can I manipulate the content of a file, by duplicating and changing some parts?

I want to manipulate a text-file. It contains many blocks of the form CLASS ...some stuff ... END I want to duplicate each of these blocks and add and remove a line of it's content. Can I script ...
16
votes
6answers
2k views

put history command onto command line without executing it

I use !n where (n) is the line number for executing a line in the history file I want executed at the command prompt which I find via history|less. But there is a command line history event I wish ...
72
votes
6answers
41k views

How can I close a terminal without killing the command running in it?

Sometimes I want to start a process and forget about it. If I start it from the command line, like this: redshift I can't close the terminal, or it will kill the process. Can I run a command in ...
11
votes
5answers
1k views

Is there a good combination of command-line and graphical file browser?

Is there a feasible solution than combines the advantages of a command-line and a graphical file browser? For example, the command-line is good to change the directory and execute commands but can't ...
6
votes
2answers
3k views

How can I install ncdu on Red Hat?

The answers provided to this question doesn't help. I'ved tried yum install ncdu But I'm getting No package ncdu available
7
votes
4answers
5k views

How to install software on Red Hat?

What's the simplest way to download/install software on Red Hat Linux (from bash command line)?
23
votes
8answers
7k 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
533 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 ...
22
votes
4answers
4k 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
159 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
493 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: ...
10
votes
4answers
13k 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
109 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 ...
17
votes
4answers
21k 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
401 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
777 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 ...