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

learn more… | top users | synonyms (1)

9
votes
2answers
568 views

What languages are used to build Unix commands?

Examples of commands I'm referring to are ls, pwd, and cd. Also, how are these built? Do you have an example?
8
votes
2answers
360 views

Command line input while a running script displays strange symbols

If I use the bash shell cli and run some program which doesn't return immediately, then I input some letters (basically typing the next command before noticing the previous didn't finish) and the ...
2
votes
3answers
171 views

How to echo (a (executable-)string) to the prompt, so that the cursor flashes at the end of the line?

How to echo (a (executable-)string) to the prompt to make the cursor sit at the end of the line? So that I can hit Enter to execute or Ctrl-C to throw away the line. Is this possible at all? I ...
1
vote
1answer
255 views

How to make FreeBSD variant of cal start weeks on mondays?

Can week start day be changed in cal output? Is it hardcoded? Notice: not the ncal.
1
vote
1answer
36 views

Why is this flag not working?

Ok so i want to view the ram and have it run continuously root@another:/etc/mysql/database_backups# free -mt total used free shared buffers cached ...
0
votes
1answer
211 views

rexecd daemon for Ubuntu

How to start rexecd daemon/server on ubuntu-11.10 ? If I try to run the command /usr/sbin/in.rexecd then an error appears as rexecd: getpeername: Socket operation on non-socket rexecd is remote ...
2
votes
1answer
2k views

How to Connect to Wireless Automatically? (Non-graphical)

I'm trying to set up my Arch Linux so that, through non-graphical means, I can connect to a wireless network through profiles on my system. I have tried net-auto-wireless, and it does everything I ...
3
votes
1answer
471 views

Command tool to create torrent files that includes MD5 hashes of files?

I'm aware of mktorrent, and know how to use it, but for testing purposes I require a utility that will also include the MD5 hash of every file in the torrent in the torrent meta info. I realize that ...
12
votes
1answer
7k views

How to remove a single line from history?

I'm working in Mac OSX, so I guess I'm using bash...? Sometimes I enter something that I don't want to be remembered in the history. How do I remove it?
5
votes
5answers
601 views

resolve all ip addresses in command output using standard command line tools

I have several log files that contain a bunch of ip addresses. I would love to be able to pipe the data through a program that would match and resolve ip addresses. I.E. cat /var/log/somelogfile | ...
6
votes
3answers
2k views

How to revert chown command?

If I run: sudo chown -R user:user / Can I revert it to what it was before I ran it?
9
votes
1answer
446 views

How do I 'unbook' a pdf

I have a pdf file that was made into a booklet format. It is meant to print on A4 paper in landscape orientation; here are two pages in the pdf, which should correspond to four pages in the actual ...
7
votes
4answers
3k 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)?
4
votes
3answers
826 views

How to tell of whether the kernel parameter [passed at command line] is a valid kernel parameter?

In the grub.conf configuration file I can specify command line parameters that the kernel will use, i.e.: kernel /boot/kernel-3-2-1-gentoo root=/dev/sda1 vga=791 plasticDuck After booting up a ...
-1
votes
2answers
510 views

Downloading DeviantArt : Favourites, Groups, Gallery…

Is there any command-line Linux tool for downloading user favourites (including subfolders), selected users galleries, groups ? (Preferably with ability to run in incremental mode, to update rip from ...
7
votes
2answers
2k views

How to remove Ctrl-M from files where dos2unix, perl, tr, and sed are not present?

Suppose you are working on a very old unix server where dos2unix, perl, tr, and sed are not present. How can you convert files from dos to unix format?
8
votes
1answer
5k views

How to display kernel command line parameters?

In the grub.conf configuration file I can specify command line parameters that the kernel will use, i.e.: kernel /boot/kernel-3-2-1-gentoo root=/dev/sda1 vga=791 After booting a given kernel, is ...
7
votes
4answers
532 views

How can I find a file whose name includes a given string, such as “abcde”?

Within a set of directories, how do I find a file whose name includes a given string, such as "abcde"?
17
votes
3answers
11k views

SSH inside SSH fails with “stdin: is not a tty”

I'm trying to connect to machine one with ssh and then connect to another machine two with ssh, but I get this error. ssh user@computerone.com 'ssh otheruser@computertwo.com' stdin: is not a tty ...
2
votes
1answer
1k views

Hold and release CUPS print jobs from command line

Is is possible to hold and release CUPS print jobs from command line? How to do it? I tried cupsenable: sudo cupsenable --release myprinter but it didn't work.
2
votes
1answer
107 views

Output redirection and spaces

I'm paranoid about this, but hopefully it's a simple question: Is there any difference between cat file1 | egrep -oP "[Mm]y string" > /home/user/file.txt and cat file1|egrep -oP "[Mm]y ...
2
votes
5answers
964 views

Need to grep file with specific letter and move to another folder linux

I need to select files which contain "Error" or "traffic" in their names, e.g. abc_ERRor.csv raError.csv bsn_Error.csv bbbctraffic.csv ccc_traffic.csv ... and move them into corresponding ...
3
votes
1answer
317 views

Extract directory from wget's stdout

I am trying to wget a tarball from github.com and, without creating a temporary file, extract a subdirectory from it: wget -qO- https://github.com/django-nonrel/django-nonrel/tarball/develop | tar ...
9
votes
1answer
871 views

How to have tail -f show colored output with vim?

In this question, Gilles answered Yet another possibility is to run tail -f in an Emacs shell buffer and use Emacs's syntax coloring abilities. Because I'm a vim user, I'd like to do this with ...
4
votes
3answers
510 views

id3v2 used recursively at command line?

Trying to get my id3 tags cleaned up and am loving id3v2 on the command line -- but I've been using it only with a *.mp3 wildcard and want to explore if there's a way to use it recursively so I can ...
18
votes
3answers
7k 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 ...
4
votes
3answers
267 views

Use command grep and locate

How I can make the grep command locate certain words in the files specified by the routes found by the locate command? locate my.cnf | grep user (I want that grep command search the word "user" ...
5
votes
1answer
2k views

How do we specify multiple ignore patterns for `tree` command?

I need to print the directory structure of our production system and I would like to remove some specific directories from the tree? How do we specify multiple ignore patterns for tree command?
10
votes
2answers
636 views

How to temporarily switch from ssh to my local shell?

I'm using cygwin. and use it with ssh to login into a ubuntu server. sometimes, I want to switch back to my cygwin and then quickly switch to ubuntu shell. How to do this?
3
votes
3answers
2k views

Find only destination of symlink

For use in a shell-script, I'm looking for a commandline-way to get the destination of a symbolic link. The closest I've come so far is stat -N src, which outputs src -> dst. Of course I could ...
2
votes
1answer
135 views

How to put “glue” CWD (etc.) to part of the screen instead of putting into PS1?

I suspect there’s some terminology for this question that I’m not aware of. It’s hard to check if a question has already been answered if one doesn’t know the proper vocabulary. So, sorry if this is ...
-1
votes
2answers
328 views

source script as command [closed]

For some reason (?), often when I write scripts nowadays they do not work, or work only in part, and then I try with . or source and they work perfectly. I'm unsure what is causing this as the scripts ...
1
vote
1answer
72 views

Rebooting makes me lose my password-less keys on other machines

When I reboot my machine (as I did today) I seem to lose some functionality, specifically my previous ssh keys that I had copied over to other machines that had allowed me to login without a password ...
2
votes
2answers
426 views

Putting Linux processes on certain CPU cores [duplicate]

Possible Duplicate: How can I set the processor affinity of a process on Linux? Computer CPUs have many cores insde them nowadays. I have always wondered if there is a way to, when I start ...
0
votes
2answers
187 views

Total RAM used by a program with `ps`? [duplicate]

Possible Duplicate: Measuring RAM usage of a program I am trying to use ps to benchmark a program, I'm just not sure which flags to use. I would like to get the amount of RAM the program ...
3
votes
1answer
105 views

Can I force myself to enter a password when run certain processes?

I frequently work in an environment where, lets call them "pranksters" may gain access to my console. I am diligent in locking my screen whenever I walk away, but given enough time someone gets 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.
4
votes
4answers
1k views

How can I check if a gzipped file is empty?

Is there a quick way to check if a gzipped file is empty, or do I have to unzip it first? example: $ touch foo $ if [ -s foo ]; then echo not empty; fi $ gzip foo $ if [ -s foo.gz ]; then echo not ...
4
votes
3answers
5k views

How to check from a command line that network is reachable?

I want to send a growl to myself after SuSE server finishes the boot process. I got this message socket_sendto(): unable to write to socket [101]: Network is unreachable in. How can I check from ...
1
vote
1answer
6k views

access external hard drive to delete folder on terminal Mac

I want to delete a folder of portable hard drive on terminal in Mac. Are there any command line ?
4
votes
1answer
1k views

Cannot set up screen panning in Ubuntu with xRandR which states that it cannot find the modes

I am using a Samsung n150 netbook with a 10.1 inch screen and it has a maximum screen resolution of 1024x600. I am running Ubuntu 10.04 LTS and want to enable screen panning for a larger virtual ...
3
votes
2answers
982 views

CentOS: Install packages listed in a text file?

I have an existing CentOS installation which I'd like to install extra packages to. The packages to be installed were supplied to me in a list, one package per line, which looks like: .... ...
3
votes
3answers
420 views

Fastest way to open all files in a directory with multiple file extensions on commandline

If I want to open all mp4 files in a directory, I can simply do something like totem *.mp4. But how can I open all mp4 and all flv files in that directory with one command. I.e. I want to do something ...
2
votes
1answer
178 views

Standard command line syntax ambigiuty in interpretation rules?

This question is somewhat similar to this: Unix/Linux command syntax Suppose I have a program foo that takes arguments -a and -b. If both a and b take a string argument what is the meaning of this ...
9
votes
3answers
280 views

How can my script know when I'm in a virtual console vs. an xterm?

A few of my scripts (keymap changing, public key adding) need to act differently when in a virtual console vs. in an xterm. What's the real code for #!/bin/ksh if [[ in_a_virtual_console ]]; then ...
2
votes
2answers
657 views

How to make duplicates with different names from a single file? [closed]

I want to duplicate the contents of a file. Suppose there is a file named "Hydrogen.element". I want to duplicate the contents of this file with a different name ie.make another file named ...
-2
votes
2answers
3k views

Difference between ifconfig and ipconfig?

Difference between ifconfig and ipconfig? What actually does dhcpcd and ifconfig does?
1
vote
1answer
488 views

Have netstat not display port numbers for foreign address

I would like to get netstat to not display port numbers on the foreign address so I can run some statistics on it. This is for a FreeBSD system. The following is a example of the output. ...
11
votes
3answers
3k views

Break a large file into smaller pieces

How do I break a large, +4GB file into smaller files of about 500MB each. And how do I re-assemble them again to get the original file?
3
votes
2answers
677 views

How do I get this find and rename command to work with subdirectories? [duplicate]

Possible Duplicate: Recursive rename files and directories I have a large directory of music files that is often changing as files and directories come and go. My preference is to make sure ...