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

learn more… | top users | synonyms (1)

1
vote
2answers
288 views

“watch” command not found in Cygwin? [duplicate]

Possible Duplicate: Cygwin has no watch command? I am in the process of learning Unix commands; I started a few days back. I read a post here and tried to use the watch command, but my ...
11
votes
4answers
17k views

User-friendly command to list all users on Ubuntu system?

Is there a user-friendly command I can use to list users in a console on an Ubuntu system? When I cat /etc/passwd I get a hard-to-read list of users. It would be nice to see an alphabetized list, ...
2
votes
2answers
358 views

View all user's printing jobs from the command line

I'm running Fedora 17, Gnome (3?), and using bash from terminal. Whenever I run lpstat I only get a list of my jobs, but every time I go to retrieve my jobs from the printer, somebody else is ...
8
votes
4answers
1k views

Compute average file size

I am looking for a handy one-liner for computing the average file size in a directory. What I want is: size of all files / number of files in directory
2
votes
1answer
409 views

Help me parse this `find` command

Following command tells me the length of mp4 video files: find -type f -name "*.mp4" -print0 | \ xargs -0 mplayer -vo dummy -ao dummy -identify 2>/dev/null | \ perl -nle ...
2
votes
2answers
546 views

Averaging output of dstat

I need to average upload and download speed using dstat -n. How can I add all the received and sent data sizes that appear after dstat -n, so that I can add them and find average upload and download ...
2
votes
1answer
193 views

How can I remaster a text-based linux distro?

So I have a Ubuntu minimal install, it is exactly the way I want it when I want to have a fresh install, with the included settings, packages, etc. It has no desktop, it is completely CLI. What is ...
3
votes
2answers
327 views

Please explain the -f option in pgrep

man pgrep says the following about -f option: -f The pattern is normally only matched against the process name. When -f is set, the full command line is used. What does it ...
5
votes
4answers
19k views

How do I know what service is running on a particular port in linux?

I am trying to run weblogic server on my linux machine and I am getting the following error : ERROR: transport error 202: bind failed: Address already in use ERROR: JDWP Transport dt_socket failed to ...
4
votes
1answer
6k views

How to make a Desktop “shortcut” that opens the terminal but under a different directory than the default home?

Objective I am looking for an easy way to consistently run a terminal that automatically opens to a specific directory. Is there a way to do that without changing the default directory? Preferably I ...
4
votes
3answers
664 views

Filesize difference of same name folders

Two different folders, have the same name but they have different filesize. Is there any linux command that can compare two folders and tell me the diff in filesize at the same time?
0
votes
2answers
562 views

Remounting HOME

I have my "/home" partition formatted as ext4 and mounted at "dev/sdc1" and occasionally have a strange problem coming up that looks a lot like this bug that I found here. A little more than half way ...
1
vote
2answers
547 views

Change command name in Linux [duplicate]

Possible Duplicate: creating abbreviations for commonly used paths I'm new to the Linux platform. Is there any way to rename the commands available in Linux. For example, I use the clear ...
3
votes
1answer
248 views

Pausing rsync via bash script?

Is there a way to pause rsync via command line, if it transfers data for over X minutes? I'm working on using it as a backup and would like it to pause every once in a while to prevent the hard disks ...
1
vote
2answers
113 views

How can I see output from a command progressively?

I have fired an ls -1 command that runs and displays a long list of values. When the command ends I can not see the output which is outside the screen vertical length. How can I see those previous ...
0
votes
1answer
112 views

How to find the command line for tinymce

I have installed the packages tinymce and tinymce2. It's an HTML Editor. sudo apt-get install tinymce tinymce2 but when I launch the command tinymce the system tells me there's no such command. ...
1
vote
2answers
701 views

ALT+F2 doesnt work in Linux Mint Mate

I am trying to install Sublime Text 2 on Linux MINT (Mate) from this tutorial. http://community.linuxmint.com/tutorial/view/907 and I'm stuck on: Next , to create a menu icon press Alt+F2 and type: ...
3
votes
2answers
238 views

Make copies of a single directory to multiple directories with different names

I'm trying to replicate a single directory (with sub-directories) to a bunch of new directories based on a list. For example I can: mkdir Fred Barney Thelma Louise Foo Bar How would I copy a premade ...
1
vote
3answers
258 views

Rerunning the same command with a different parameter

I know that I can run the following command ls Some{File,Folder} And it is equivalent to running this: ls SomeFile SomeFolder (I also use it a lot for things like mv place_{a,b}) However, I was ...
2
votes
0answers
100 views

Command-line file reader (like “less”) that can tell the line where the user stopped reading

[Context] I'm developing a little app, as a hobby to learn ncurses, that catalogs and lists and searches within a set of documents (for now, they are the HOWTOs from TLDP). The most tricky part of ...
1
vote
1answer
200 views

Application in terminal still running but not directly accessible [duplicate]

Possible Duplicate: How to suspend and bring a background process to foreground I have kind of an odd problem which I haven't encountered before. Here's what I did: I started an ...
6
votes
1answer
152 views

What's the difference between “command directory” and “command directory/”? [duplicate]

Possible Duplicate: When should I use a trailing slash on a directory? Does the slash make any difference?
2
votes
1answer
176 views

Does each user get his/her own tty(s)?

I put a simple echo command in a CLI tty by user1 expecting it to reach user2 who is logged in a separate tty. echo "Hello, world!" >> /dev/tty5 I expected user2 to get the echo message but ...
8
votes
3answers
720 views

Bash: Capture / Use last (or Nth) line in stdout

Query I use Bash. When I'm looking for files, often I'll do the following: find -name stackexchange.hs And often the results will look like: /youre/the/man/now/dog/stackexchange.hs ...
1
vote
0answers
357 views

Wired connection from CLI with NetworkManager - “up” in elegant way

Sometimes I need to do some operational work in text mode and I need to setup internet connection from command line (without any networkmanager applet). (Please note: that when I run Window Manager, ...
3
votes
1answer
1k views

How to change the properties of a desktop panel from the command line?

I use RHEL 6 as my regular operating system and for one of my user accounts I made one of the desktop panels as auto-hide and other as a fixed panel. I expected the hidden panel to appear above the ...
3
votes
2answers
1k views

Can the UNIX command tree display only directories matching a pattern?

I'm trying to figure out if there is a way to get the UNIX command tree to display only directories that match a specific pattern. % tree -d tstdir -P '*qm*' -L 1 tstdir |-- d1 |-- d2 |-- qm1 |-- ...
1
vote
2answers
1k views

Can the UNIX command tree display only directories matching a pattern?

I'm trying to figure out if there is a way to get the UNIX command tree to display only directories that match a specific pattern. % tree -d tstdir -P '*qm*' -L 1 tstdir |-- d1 |-- d2 |-- qm1 |-- ...
1
vote
1answer
190 views

Sed and Awk learning material [closed]

I'm looking for some learning material for sed and awk, can anyone make any suggestions? Please don’t refer to man and help pages. -O-
10
votes
5answers
1k views

How to find files with 100% NUL characters in their contents?

What is the Linux command-line command that can identify such files? AFAIK the find command (or grep) can only match a specific string inside the text file. But I want to match whole contents, i.e. ...
3
votes
4answers
11k views

Installing JDK 7 on debian

So I just rented a dedicated server running Debian, and I know nothing about Linux. Anyway, I want to install the JDK 7, first I connected through SSH and granted myself administrator rights by ...
3
votes
3answers
2k views

How can I call bc from within awk in this case?

OK, so I love my awk, but yeah, it has precision issues, and unfortunately there's no easy way for me to install the multi-precision extensions known as gawkextlib. What I am doing is, I am working ...
4
votes
1answer
780 views

Mass ID3 tag editor like vorbistagedit?

My favorite tool for batch editing of vorbis comments is vorbistagedit. I can do vorbistagedit *.ogg and it lets me edit the metadata in all my ogg files at once in my favorite editor (emacs). I'm ...
1
vote
3answers
368 views

Automatically printing images with added captions

I have a lot of scanned images and images/photos I'm working on with multiple versions. When I print them (using various programs), all I get is the image and, often, it's difficult to tell which ...
2
votes
3answers
3k views

How does the set-user-ID mechanism work in Unix?

Can someone please explain the set-user-ID mechanism in Unix ? What was the rationale behind this design decision? How is it different from effective user id mechanism ?
3
votes
1answer
948 views

Configuring Yaboot and Debian to Boot into a Command Line Login Shell?

I have a Debian Squeeze variant (MintPPC 9) installed on an old Mac Powerbook G4 (PowerPC CPU). I wish to boot it into a multiuser CLI login shell instead of automatically booting into the login ...
0
votes
2answers
81 views

Is there any way of prompt a message when a command in /usr/sbin/ is tried to run as nonroot?

In most Linux distros I've used when you type for example ifconfig as a normal user, you get a prompt message telling you that only root can execute such command. In Debian, it only says command not ...
2
votes
2answers
3k views

Get list of installed printers

Inside of a script I send a certain file to print using the lpr command on an user-selected printer. The list of the printers, from which the user selects the one to use, I get using the lpstat -a ...
4
votes
2answers
2k views

Check SMTP server capabilities on the command line

I know an SMTP server's URL. I want to know about that SMTP server's capabilities: TLS, password encryption, etc. Evolution Mail knows how to report these. How can I get them from the command line? ...
1
vote
1answer
133 views

Monitor if a running X session is idle for a while

Is there any way to monitor if a X session is inactive for i.e 10 minutes? And I would execute a command when it happens, like a screensaver, but it's not a screensaver in this case.
1
vote
1answer
185 views

Display words in color

I am looking for a tool which takes a file in input and a word to search. It should display the file with color the words if it corresponds to the search. Like grep --colors but displays all the ...
3
votes
1answer
389 views

How to get bash to suggest a missing package?

While running Ubuntu, while trying to execute a commmand in bash, it used to suggest that the said program was missing but found in another package Y, and that I could try installing it. Now on a ...
6
votes
2answers
29k views

Zip all files in directory?

Is there a way to zip all files in a given directory with the zip command? I've heard of using *.*, but I want it to work for extensionless files, too.
2
votes
1answer
321 views

Is there a way of color-highlighting paired brackets in shell (bash)?

Does anyone know if there is a way reproducing the same behaviour many text editors provide for colour-highlighting the syntax operators such as brackets or curly brackets. It would be very useful for ...
1
vote
3answers
3k views

How to run the most recent command on AIX?

How can I run the most recent command again from history in AIX Server? And how to edit the most recent command and run it again in AIX?
3
votes
1answer
1k views

xargs : using same argument in multiple commands

Am trying to write a one-liner that can probe the output of df -h and alert when one of the partitions is out [or almost] of space. It's the part using xargs that kicking me in the ass now... echo 95 ...
4
votes
4answers
3k views

How to exit sh program?

I bungled the commands and wrote sh -man Now I've entered a program called sh-3.2 that is seemingly impossible to exit. Ctrlc,Ctrlz, or Ctrlxdoes not work. exit, quit, q, :q also does not work. ...
2
votes
1answer
406 views

Make stdout and stderr be buffered by the same buffer

Is it possible to force glibc to use the same buffer for stdout and stderr? If I tee the both outputs: ./tests/tests 2>&1 | tee log I get mixed messages (i.e. messages are ordered inside ...
2
votes
2answers
522 views

Sort the output of find before piping to openssh

I'm using this command to recursively generate a SHA-512 hash for each file in a directory hierarchy: find . -type f -exec openssl sha512 {} \; I'd like to sort the files in lexicographical order ...
0
votes
2answers
2k views

“system-config-network-tui &” doesn't work

When I try to edit or assign the IP using this command: system-config-network-tui & Terminal opens a console which is uncontrollable, just like this: This happens on CentOS and Red Hat.