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

learn more… | top users | synonyms (1)

10
votes
4answers
19k views

How to check password with Linux?

I want to check, from the linux command line, if a given cleartext password is the same of a crypted password on a /etc/shadow (I need this to authenticate web users. I'm running an embedded linux.) ...
3
votes
3answers
5k views

amixer - How to change recording channel?

So fat, I am setting up microphone settings : $ amixer set 'Rear Mic' 90% mute cap $ amixer set 'Rear Mic Boost' 80% But, after some sys. update, my default recoding chanell changed to 'Front Mic' ...
3
votes
2answers
2k views

Is there a command-line email client and auto-download attachment to a file?

Is there a linux email client that can run on command line and can be configured to fetch and automatically save attachments to the filesystem? Im currently using Thunderbird and it has a nice ...
5
votes
1answer
4k views

Configure wireless network from the command line

I know I can use ifconfig to configure my ethernet network interfaces. But can I also configure my wireless network interfaces using ifconfig. (It seems to be listed as eth1 in ifconfig output, why is ...
8
votes
4answers
7k views

How do I limit the number of files printed by ls?

Is there a way to limit the quantity of listed files on a ls command? I've seen: ls | head -4 but to get head to be executed I need to wait for ls to finish execution, and with directories with an ...
1
vote
6answers
306 views

Minimize need for sudo

Very often I need to use the sudo command because the command I'm running needs higher privileges. Is there some method to minimize the usage of sudo and/or a way to use it that's faster than typing ...
13
votes
1answer
19k views

How to use command line to change volume?

I am trying to control the volume using my programming script. How can I do the following in Fedora 15, Ubuntu linux? Mute/ Unmute Volume up and volume down Note: Please note that I use a web USB ...
4
votes
2answers
4k views

CalDAV command line client?

I'd like to do my CalDAV from the CLI just as I do my IMAP from mutt, what is my best bet as far as clients are concerned?
3
votes
1answer
551 views

Using iscan (GIMP plugin) from the command line

I'm something called iscan to use my scanner. However to use it, I need to go through a GUI to get my scanned pdf. When I run iscan --help (because just iscan launches the GUI), it tells me that it is ...
0
votes
0answers
56 views

Finding out what Linux I'm running [duplicate]

Possible Duplicate: Bash: Get Distribution Name and Version Number Is there any consistent way of determining the Linux Distribution / Release that a machine is running if you don't already ...
4
votes
4answers
1k views

Which stream does Bash write its prompt to?

I am trying to redirect all output from bash (prompt, user input, results) to a file Example: /bin/bash > file.txt 2>&1 I thought that would work, but I'm not getting the prompt. Can ...
2
votes
2answers
400 views

Detect bad USB cable

Is it possible to detect with confidence via command line that the USB cable is damaged? I tried to connect my printer and it's not printing with this cable, I guess that the culprit is the USB cable. ...
9
votes
2answers
255 views

What is not shell specific?

Under some answers, I see comments that recommend avoiding shell specific commands in answers. How do I know which commands, operators, etc exist in all shells? Is there a list of standards? man ...
6
votes
3answers
10k views

How to use /dev/fb0 as a console from userspace, or output text to it

So I have a Palm Pre (original P100EWW) model that I enabled developer mode on, and installed a Debian Squeeze chroot. Works great. I have plans to use this for ANYTHING (bittorrent peer, web ...
9
votes
3answers
459 views

syntax_highlight <source_file> | lpr

Does anyone know of a simple way to produce the PostScript corresponding to a syntax-highlighted version of a source file that can be piped directly to a PostScript printer? As the wording of the ...
7
votes
3answers
5k views

How do I grep without leading whitespaces?

I'm greping through a large codebase, and leading whitespaces and tabulation seem to be quite annoying. Is there any way to get rid of it? grep -R "something" ./ E.g, instead of: foo/bar.cpp: ...
7
votes
4answers
3k views

Make cd automatically ls

I find that I often do the following: %> cd bla/bla %> ls I would like it that whenever I cd into a directory it automatically does an ls. I fiddled with my .bashrc for a while, but couldn't ...
7
votes
4answers
7k views

Is there a simple linux command that will tell me what my display manager is?

Is there a simple linux command that will tell me what my display manager is? I'm using Xfce. Are different desktop environments usually affiliated with different display managers?
3
votes
1answer
321 views

Removing redirection operator does not change output. Why?

I saw this usage of redirection somewhere, and thought it was a typo: grep root < /etc/passwd But after I run it, I saw that it gives the same output with grep root /etc/passwd: $ grep root ...
2
votes
2answers
1k views

Home key not working in terminal

I am using GNOME Terminal 2.7.3 and zsh 4.3.9 (x86_64-unknown-linux-gnu) Home and End are not working. Nothing happens and nothing gets displayed when I press them. but they work when I press shift + ...
2
votes
3answers
263 views

Execute and renice a process in one command

Does anyone know if it's possible to execute and renice a process in one command, i.e. without having to look up the command in the list of processes using the ps command and then renice that ...
6
votes
2answers
524 views

What commands have -h human readable option, and how can I enable it by default w/env variable?

I'm tired of using aliases or typing -h. I want human readable output 24/7. Is there a way to enable it all the time for all commands that offer it?
3
votes
2answers
10k views

Command to install linux headers fails

I need to install my linux headers for an Nvidia driver install. But I get an error when doing so: peter@peter-deb:~$ sudo apt-get install linux-headers-$(uname -r) Reading package lists... Done ...
1
vote
0answers
96 views

Seeking command-line example for adding images to MP3 files [duplicate]

Possible Duplicate: Searching for a command line tagging tool for mp3 and ogg that supports pictures Anyone have a command-line example illustrating how to properly embed an image (for ...
3
votes
4answers
5k views

How to display line number while doing grep on a file

How to display line number while doing grep on a file. For example: grep CONFIG_PM_ADVANCED_DEBUG /boot/config-`uname -r
11
votes
5answers
3k views

How to soft kill gui applications via terminal?

Is there a way to close a GUI application in friendly "please quit yourself now" way, without graphical access to the applications window? For example, if Gnome/X display crashes to black, I'd like ...
20
votes
2answers
4k views

How can I display syntax highlighting on a file?

Is there a variant of cat that outputs syntax-highlighted lines of code when used on a source file? An idea: maybe vi[m] or another editor can be asked to dump the syntax-highlighted contents of said ...
4
votes
2answers
916 views

What is the “caller” command?

I'm running Ubuntu 10.10 with openbox running on top. I noticed today a command called caller, however there is no man page, it does not respond to any input (or --help) and whereis doesn't find it. ...
2
votes
4answers
350 views

sudo to remember password for list of commands?

Is there a way in Linux to make sudo command to remember the password the user entered for in the first of the lines? For example, for a list of commands that the user has to enter, the some of then ...
9
votes
2answers
2k views

mv a file without breaking a symlink to that file

Is it possible to mv a file w/out breaking a symbolic link to that file? My initial response to this is no, and I'm working out a script based solution to change the links immediately following the ...
5
votes
4answers
143 views

Change command-line “environment” to programs command

In a console, is it possible to change into a commands "environment"? To explain, I take "git" as an example. While programming and using a git repository, I change to the repos path and then do many ...
2
votes
3answers
849 views

Recommended Resources To Get Started With Terminal-Only Linux Server?

I want to try to setting up a headless (terminal-only) Ubuntu Linux server, and am trying to find resources to get started. I've been a GUI Linux/Windows user for a while now, and have run through a ...
4
votes
2answers
1k views

How to prevent my screens from dimming (going black) from the command line

In KDE, there was a system setting where you could specifically set the monitors to never go black. Now I've switched to dwm and (it might not be related) my screens dim after about 10 minutes. How ...
6
votes
3answers
915 views

Use `less` to view comma-aligned data

I have a big CSV file. I would like to view my file using less or some command like it which doesn't have to read the whole file at once to show me part of it. Is there a command out there which can ...
19
votes
3answers
11k views

How does the “tail” command's “-f” parameter work?

$ tail -f testfile the command is supposed to show the latest entries in the specified file, in real-time right? But that's not happening. Please correct me, if what I intend it to do is wrong... I ...
5
votes
2answers
79 views

Handling an option-like filename in the shell [duplicate]

Possible Duplicate: How do I delete a file whose name begins with "--"? Due to mismatched switches when I was trying to run a command, I have a log file named -w in a directory. I ...
4
votes
3answers
430 views

GNU: Delayed jobs Queue

Is there a simple way for me to add a shell command to a list of jobs to have run on the system when I'm not logged in? For example: I SSH into my system, decide that I want to read an ebook later, ...
3
votes
1answer
505 views

Keyboard input not displayed on the screen?

We use the `exceed tool to connect to our UNIX servers, but sometimes the command-line behaves erratically. When I am typing some command on the command-line, nothing happens -- nothing is displayed ...
3
votes
1answer
3k views

command line tool to set time zone

In Centos 5.x there is the text mode interface of system-config-date to set the time zone. Although that utility still exists in Centos 6 the text mode is gone. Is there anything similar in Centos 6?
4
votes
1answer
793 views

Is there a tool in linux that allows multi-line regex expressions?

I'm wanting to find the results of a multi-line regular expression in linux. I tried grep, but like most linux utilities it's line based. Is there something similar that allows me to search across ...
24
votes
3answers
8k views

How can I “relink” a lot of broken symlinks?

I have a directory tree which has a bunch of symbolic links to files under /home... however, I have moved /home to /mnt/home and need a way to "relink" all of the symlinks. Does such functionality ...
1
vote
1answer
128 views

How can I display file info of a man?

I know when you are in a man page it will display the file name at the bottom inside the man. How can I do the same thing manually?
8
votes
1answer
1k views

How to run my own program without specifying its path

Let's suppose I have compiled something and I run it like so: $ /path/to/my/executable/mycmd Hello World What do I need to do to run it like $ mycmd Hello World from everywhere in my computer? ...
3
votes
1answer
1k views

How do I add ncmpcpp search results to the current playlist?

Using the ncmpcpp MPD client, in the search function (F4) how can I add all the search results to the current playlist short of adding each item one-by-one? For example, say I search for all music ...
2
votes
1answer
301 views

rotating buffer type file logging utility

I'am trying to debug a server that throws a lot of logs on stdout/stderr. I need to redirect only last N lines to a file. Something like a rotating buffer feature there in tcpdump's -C & -W flags. ...
3
votes
1answer
2k views

Convert a folder of images into a multi-page pdf file usind command line tools?

I have a folder with 100 jpg images. I want to convert these images into a multi-page pdf file, with all the images (cropped to A4 size). They are already in the correct rotation. Which tools should ...
6
votes
5answers
2k views

How can I run `watch` as a background job?

When I run: watch 'cmd >> output.txt' & the job gets suspended by the system: 3569 Stopped (tty output) Is there a workaround?
2
votes
3answers
866 views

Change character position with sed

The file contains: dateutkfilename25012009 I want to change the position of character 16th to 17th with 18th to 19th. And then change position of character 16th to 19th with 20th to 23rd... so it ...
2
votes
2answers
3k views

Add carriage return to output of `tail` while using `grep`

I'm looking to refactor the following command: tail -f production.log | grep -e "Processing " -e "compatible;" -e "Completed in " -e This is the output of the command: Processing ...
2
votes
2answers
820 views

creating simple command for sudo apt-get install?

I need to run these commands very often: sudo apt-get install <package> sudo apt-get remove <package> Can I make it simple like: install <package> remove <package> I ...