Unix is a multitasking, multi-user computer operating system originally developed in 1969 by a group of AT&T employees at Bell Labs.

learn more… | top users | synonyms

14
votes
2answers
7k views

Linux 'man' command: How do I search for a word/phrase and cycle through?

When looking for a certain word or phrase in the man page of linux command, one can type '/' followed by the word/phrase to search for it. What I'd like to be able to do is to search for the next ...
14
votes
2answers
20k views

What is a CPU tick?

Question: How is a CPU tick calculated and what does it represent? Does a single tick equate to 10 miliseconds thus if some thread reported not called for (5 * 10 ticks = 500 ticks) does this mean ...
14
votes
1answer
637 views

Make Firefox use the favicon as window icon under Linux

Is there a Firefox feature, setting, or add-on that arranges it so that the favicon of the currently open web page becomes the icon of the browser window in Linux/X11? In particular, it ought to show ...
13
votes
5answers
600 views

How to jump to a particular flag in a Unix manpage?

When reading a Unix manpage in the terminal, how can I jump easily to the description of a particular flag? For instance, I need to know the meaning of the -o flag for mount. I run man mount and want ...
13
votes
2answers
8k views

Counting total number of matches with grep instead of just how many lines match

Does grep offer a way to count the total number of matches it makes? The -c option only returns the number of lines that matched the regex, but in this case I have multiple matches per line.
12
votes
8answers
562 views

Is there a command for going back a number of steps in a directory, without using cd?

I'm constantly going 'cd ../../../../'. Is there a command/alias that could let me go 'cmd 4' and I'd be taken back 4 directories?
12
votes
4answers
15k views

Do symbolic link files survive SVN?

Let's say I create a symbolic link file inside an SVN managed path, commit the path to SVN and later checkout the path. 1) Will the symbolic link file survive? 2) If the symbolic link file is made ...
12
votes
4answers
3k views

What is the unix command to find out what executable file corresponds to a given command?

For example, if passed ls as input it should tell me that /bin/ls will run if run ls on the command-line.
12
votes
4answers
7k views

How can I recursively grep paticular files in a directory

I'm new to linux and grep, and trying to find my way around. By using find -name *.java I am able to find the names of all of the java files in a particular directory. Suppose I want to count the ...
12
votes
9answers
3k views

Finding what's using all the space in *nix

Which sequence of commands will tell me which files are the largest starting from a particular directory, including all sub directories? I want to know where all the space went. Preferably just with ...
12
votes
4answers
8k views

Unix zip directory but excluded specific subdirectories (and everything within them)

I'm trying to zip a directory (on Unix via SSH) but I need to exclude a couple of subdirectories (and all files and directories within them). So far I have this: zip -r myarchive.zip dir1 -x ...
12
votes
4answers
4k views

How to make Emacs read buffer from stdin on start?

With Vim I can easily do $ echo 123 | vim - Is it possible to do with Emacs? $ echo 123 | emacs23 ... Emacs starts with a Welcome message $ echo 123 | emacs23 - ... Emacs starts with an empty ...
11
votes
5answers
2k views

Map “untar” to tar xvfz?

How can I map 'untar' as a command to 'tar -xvfz' ? Sorry, but I almost always forget the arguments necessary to 'tar' for this operation.
11
votes
5answers
12k views

use rm to remove files and directories recursively

is it possible to use rm to remove files and directories matching a pattern recursively without using other commands?
11
votes
6answers
6k views

Full command text with unix ps

When we enter: ps -f ... the CMD column text doesn't show the full command. Any way to prevent this truncating? Seems like it's showing the first 80 characters. We are running a fairly ...
11
votes
2answers
320 views

Linux mv command moved data to an unknown location?

I accidentally executed this command in SSH: mv /var/www/vhosts/website/httpdocs/magento/* Now all the data in the magento dir is gone. Does anyone know where it moved to? Thanks!
11
votes
2answers
623 views

Why does redirecting the output of a file to itself produce a blank file?

Why does redirecting the output of a file to itself produce a blank file? Stated in Bash, why do less foo.txt > foo.txt and fold foo.txt > foo.txt produce an empty foo.txt? Since an ...
11
votes
4answers
2k views

Is there an image viewer that takes images on STDIN?

I'm looking for an image viewer that takes data on stdin and can be run like: cat image.png | imageviewer
11
votes
3answers
15k views

unix copy a directory

How can I copy a directory structure dir1 to dir2 ? (with all the subdirectories) in unix using the terminal window
11
votes
4answers
7k views

How can I find the oldest file in a directory tree

I'm looking for a shell one-liner to find the oldest file in a directory tree.
11
votes
2answers
10k views

Unix: How to merge two directories

Say I have two folders with various content, foo and bar. How can I merge bar into foo so that: Files in foo that are not in bar are untouched. Files in bar that are not in foo are now in foo. Files ...
11
votes
2answers
7k views

How to make files created in a directory owned by directory group?

Is there a way, on Linux, to cause all new files created in a directory to be owned by the directory's group instead of the creating user's group?
11
votes
3answers
11k views

UNIX - mount: only root can do that

I need to allow a non-root user to mount/unmount a device. I am a total noob when it comes to UNIX, so please dumb it down for me. I've been looking all over teh interwebz to find an answer and it ...
11
votes
2answers
2k views

Unix: Files starting with a dash, -

Ok, I have a bunch of files starting with a dash, -. Which is not so good... and I want to rename them. In my particular case I would just like to put a character in front of them. I found the ...
11
votes
3answers
8k views

How do I configure SSH so it dosen't try all the identity files automatically?

I have been putting my ssh identity files inside my ~/.ssh/ folder. I have probably about 30 files in there. When I connect to servers, i will specify the identity file to use, with something like ...
11
votes
3answers
3k views

Making Linux shell prompt show last return value

I'm currently on a Linux machine and the shell prompt is showing me the last return value and number of executed commands (picture included, with these numbers shown in purple). My own computer ...
11
votes
1answer
9k views

Unix: Is there a way to “copy” file or directory permissions?

I have two files in a directory. One has correct permissions and the other has not. Is there a way I can "copy" the set of permissions from one file to another?
10
votes
5answers
813 views

How to jump back to the first character in *nix command line?

When writing a long command in the *nix command line and having to go back to the first character, in order to add something at the beginning (for instance a nohup, when you realize the process will ...
10
votes
2answers
12k views

How to keep program running after SSH disconnection? [duplicate]

Possible Duplicates: Keep a program running after closing a console, after the program has started How can I use ssh to run a command on a remote Unix machine and exit before the command ...
10
votes
3answers
9k views

Bash Man Page: kill <pid> vs kill -9 <pid>

My man page does not document the difference between kill <pid> and kill -9 <pid> Since these do different things why is the -9 not documented in the kill manpage? I thought maybe ...
10
votes
3answers
2k views

Calling a script with ./bla.sh vs. . bla.sh

Can anybody explain to me what the shell does in the two examples A) and B) below? It obviously behaves differently, but I can't find out why the output is different. Example: Let's have a script in ...
10
votes
5answers
2k views

How to mass prepend text to file names?

Lets say I have a directory full of .md files all named various things. Lets say I wanted to prepend "text" to the front of each file name. So for example: file a.md, b.md, and c.md would become test ...
10
votes
5answers
8k views

Store the output of date and watch command to a file

I am a newbie to linux and I am trying to watch a command and try to log it into a file. I tried watch -t -n 10 "(date '+TIME:%H:%M:%S' ; ps aux | grep "pattern" | wc -l)" >> logfile and am ...
10
votes
6answers
5k views

Sorting human readable file sizes

How can I sort a list using a human-readable file-size sort, numerical sort that takes size identifier (G,M,K) into account? Can I sort "du -sh" output for example? Problem: Consider the problem of ...
10
votes
8answers
5k views

How to run commands as in a queue

I need to do a lot of copying of various files to various folders. I can add all my copy commands to a bash script and then run that, but then I must wait until it finishes if I want to add more ...
10
votes
5answers
3k views

What is the official installer for Unix packages on Mac OS?

I'm a bit confused about the installation of standard Unix packages on Mac OS X. For example, I have /usr/bin/svn, which is SVN v.1.4.4, but FinkCommander says svn is not installed. The same holds for ...
10
votes
3answers
13k views

How can I use ssh to run a command on a remote Unix machine and exit before the command completes?

How can I use ssh to run a command on a Unix machine and exit before the command completes? For instance, if I type ssh localhost 'sleep 60 &' ssh hangs on my terminal until sleep completes, ...
10
votes
3answers
4k views

SSH: completly disabling password authentication

is there a way to disable password authentication completely? The command line is the following: ssh -o KbdInteractiveAuthentication=no -o PasswordAuthentication=no machine" it STILL asks for a ...
10
votes
2answers
7k views

What does the @ in ls -al mean? [duplicate]

Possible Duplicate: ls -la symbolics… what does that last symbol mean? What does the @ in the below execution of ls -al mean? atom:Lib fak$ ls -al total 1056 drwxr-xr-x 5 fak staff ...
10
votes
4answers
9k views

.tar files without directory structure

I'm .taring some files with the path example/super_user/Output.*. The resulting .tar looks like this: + example + super_user - Output.zip - Output.xml - Output.txt ...
10
votes
3answers
12k views

ps: How can i recursively get all child process for a given pid

How can I get the entire process tree spawned by a given process displayed as a tree and only that tree i.e. no other processes? The output could e.g. look like 4378 ? Ss 0:10 SCREEN ...
10
votes
2answers
10k views

How long are files kept in /var/tmp/, and how to use the directory?

I'm always hesitant to use /var/tmp/, because I never quite know exactly how long the files are kept there for, or even what the directory is used for. What determines when a file gets removed from ...
10
votes
2answers
242 views

How to move folder in unix using mv, only when target is on the same drive

I need to move a folder using unix mv command, but only if the target is in the same drive or the same filesystem. What would be the best approach?
10
votes
5answers
5k views

What is a “pipe” and how can it be “broken”?

I've gotten the "broken pipe" error from Xcode one time too many. I'm now curious to know exactly what a pipe is. What is the concept of a "pipe" and how can it be "broken"?
10
votes
9answers
5k views

“Detach” and “Reattach” xterms across X sessions?

Is there a way to save/detach an xterm (or another window), and reopen/load/reattach it on a different X session on the same machine ? What I'm trying to achieve is "move" running xterms between two ...
10
votes
4answers
7k views

Vim highlighting for specific file types (where to put syntax files, vim events, line to put into vimrc)

I have defined a file time jak.vim to offer custom highlighting when I take notes, however it is being applied to some files that do not have the .jak extension. Specifically a file named ...
10
votes
2answers
104 views

vi / vim abrumpt buffer movements within window

When using :set wrap in vi/vim, the contents of an entire wrapped line are placed in the display buffer upon moving the cursor into a new line, even when navigating through a file by display line ...
9
votes
11answers
3k views

Unix: How can I allow only one person to see my folder in the same fs?

I want to give an access to a dir for a friend. He has the access to the file system, where the dir is located. I don't want to set the permissions to all users. How can I allow only a person to see ...
9
votes
6answers
2k views

What is the difference between Unix and Linux?

I want to know what the actual difference between Unix and Linux is. Do they share the same kernel? Is Linux built on Unix? Do programs written for Linux work on Unix and vice-versa?
9
votes
5answers
725 views

How do we pronounce “/etc” folder? [closed]

Can't find similar question in SU. Anyone knows? Is it only 3 letter e,t and c? I can't find similar things in google. It would be good if someone provide this answer