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

20
votes
4answers
3k 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
20
votes
6answers
22k 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 ...
20
votes
3answers
6k views

Use GNU screen as login “shell”

What's the best way to have screen automatically run when you open a new shell, whether by login, xterm, or anything else? I see the most common recommendation is to put exec screen in your regular ...
20
votes
4answers
39k views

What's the difference between .profile and .bash_profile, and when do you configure which? (Mac) [duplicate]

Possible Duplicate: Difference between .bashrc and .bash_profile What's the difference between .profile and .bash_profile, and when do you configure which? I.e if I configure the ...
19
votes
6answers
23k views

Find and delete all the directories named “test” in linux

I have many directories named "test" and I would like to remove them. I know how to find them and print them using: find . -name test -print Now, how to do I remove the directories? Please note ...
19
votes
3answers
14k views

Can I monitor a local unix domain socket like tcpdump?

I'd like to monitor responses on a unix socket without disturbing the original connections and pipe them to a script for processing. I know how to do this with tcpdump for tcp connections but I ...
18
votes
4answers
691 views

Getting rid of a file called “-d” [duplicate]

Possible Duplicates: How do I delete a file named "-p" from bash? How to delete file with this name on linux: -]???????q Removing "-rf" file in Unix I've ...
18
votes
2answers
18k views

Understanding top command in unix

When I run top -c command on my UNIX box I get the output below: top - 03:09:34 up 5 days, 6:14, 1 user, load average: 0.00, 0.00, 0.00 Tasks: 175 total, 1 running, 174 sleeping, 0 stopped, ...
18
votes
1answer
42k views

What does directory permission 'S' mean? (not lower case, but in upper case)

I downloaded Eclipse, uncompressed it, did a few other things and all sudden I notice this interesting behaviour: ^_^ ~/Downloads > sudo chmod 0000 eclipse/ ^_^ ~/Downloads > stat eclipse/ ...
18
votes
2answers
29k 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 ...
17
votes
5answers
3k views

Does dual-booting an OS require a dual-core processor?

My friend claims that dual booting, using two different OSes, requires a multi-core or multi-threaded processor. Is this true? And if I install additional OSes, will my computer slow down any?
17
votes
3answers
2k views

How can I remove a file or directory called “\”?

I'm using terminal on a Ubuntu machine and there is a file that I would like to delete. The file's name is \ (just a backslash). Now usually I would just do rm filename However if I do rm \ then ...
17
votes
4answers
18k views

Is there a Windows equivalent of the Unix “strings” command?

strings in Unix and Linux extracts printable strings from a binary file. Is there a version of this for Windows? I couldn't find one.
17
votes
2answers
600 views

What does the 1 in ls(1) refer to? [duplicate]

Possible Duplicate: What do the parentheses and number after a Linux command or C function mean? I see that many utilities have a number in brackets after their name, for example ls(1) or ...
16
votes
2answers
30k views

How do I find the size of a directory on a Unix-like command-line?

I know this is a very basic question, but I searched the web and did not find a simple answer. I'm sure it's some kind of two or three letter command, right?
16
votes
5answers
7k 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 ...
16
votes
4answers
16k views

Users in /etc/passwd on Mac OS X

By examining the /etc/passwd I should get a list of all users in the system. However, when dumping the passwd file on Mac OS X I don't see my current username but many entries like these: ...
16
votes
2answers
15k 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 ...
16
votes
4answers
10k views

Why is the size of a directory always 4096 bytes in unix?

I am sure a directory file has much less information than 4096 bytes. I know the sector size is 4096 bytes. But normal files smaller than that do exist. Why does Unix reserve 4096 bytes for each ...
16
votes
1answer
18k views

How do I clear out the ssh-agent entries (on Mac OS X )?

I'm running Mac OS X, and it appears that after SSHing to several machines, using identity files, my 'ssh-agent' builds up a lot of identity / keys and then sometimes offers too many to a ...
16
votes
2answers
14k 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 ...
15
votes
4answers
19k views

count lines in a compressed file

if i have a .gz file on unix which has certain number of lines. How could i count the lines on unix without uncompressing it.
15
votes
5answers
977 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 ...
15
votes
6answers
11k 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 ...
15
votes
4answers
28k views

How to copy a file in unix without altering its last modified time?

If I copy some file from some place to another using cp, the timestamp on the copied file is set to the time of the copy. Is there some way to avoid this? I need to copy files without altering their ...
15
votes
6answers
13k 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 ...
15
votes
2answers
12k views

Difference between /etc/crontab and “crontab -e”

What is the difference between the crontab located in /etc/crontab and the crontab that can be edited using crontab -e?
15
votes
2answers
9k 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 ...
15
votes
2answers
5k views

What happens to running processes when I lose a remote connection to a *nix box?

I occasionally lose my remote SSH connection to my VPS. I use screen for long-running processes, but am wondering what happens to the processes I had running aside from those run within a screen ...
15
votes
1answer
700 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 ...
14
votes
7answers
974 views

Is there a way to go to any directory from any other directory directly?

Is there a way to go to any directory from any other directory directly? For example, lets say that I'm at root and I wanted to go directly to currentProject without doing: cd ...
14
votes
5answers
16k 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?
14
votes
5answers
23k views

finding L2 cache size in Linux

I wanted to know how to find L2 cache size in Linux... for L1 cache size, I am doing the following pico /proc/cpuinfo what about L2 cache size?
14
votes
8answers
11k 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 ...
14
votes
9answers
6k 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 ...
14
votes
2answers
4k 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 ...
14
votes
2answers
13k 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?
13
votes
4answers
17k 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 ...
13
votes
3answers
32k views

Copy list of files

I have a list of files separated by spaces in a file list.txt. I'd like to copy them to a new folder. I tried to do: cp `cat list.txt` new_folder but it did not work. How would you do this ? ...
13
votes
4answers
5k 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.
13
votes
5answers
378 views
13
votes
3answers
13k views

what is the max length of password on unix/linux system?

what is the max permissible length of password on unix/linux system?
13
votes
3answers
47k views

Copy Folders from one Unix server to another?

I would like to copy a folder from one Unix server to another Unix server. Can anyone tell me if there is a method or command to to achieve this?
13
votes
4answers
8k views

How can I recursively grep particular 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 ...
13
votes
3answers
13k 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 ...
13
votes
4answers
11k views

removing write permission does not prevent root from writing to the file

I just noticed on my Ubuntu machine (ext3 filesystem) that removing write permissions from a file does not keep root from writing to it. Is this a general rule of UNIX file permissions? Or specific ...
13
votes
9answers
7k 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 ...
13
votes
3answers
5k views

Using `find` for multiple file extensions

I am using the following command for counting the lines of text in JAVA files: find . -name '*.java' | xargs wc -l How can I modify the find command parameters to match more than one file ...
13
votes
2answers
9k views

what does the @ symbol mean in ls -l directory listing? [duplicate]

Possible Duplicate: ls -la symbolics… what does that last symbol mean? When I run ls -l on my mac I see two .yml files: -rw-r--r-- 1 aa staff 6 Apr 15 05:50 s1.yml -rw-r--r--@ ...
13
votes
2answers
4k views

Linux-like top/netstat/etc. on Mac OS X?

Unix utilities on Mac OS X are quite painful to use. port install coreutils +with_default_names and a few other such replacements fix most of them, but it leaves some in broken Mac OS X defaults - ...