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

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
7k views

Terminal Vs. Shell [duplicate]

Possible Duplicate: What are the differences between shell , console & terminal? This probably sounds like a stupid question but I'm having a lot of trouble clearly differentiating ...
10
votes
2answers
246 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
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
7k 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 ...
10
votes
2answers
106 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
7answers
5k views

Advantages of cat'ing file and piping to grep

Are there any additional advantages of cat'ing a file and piping it to grep, besides convenience? The convenience being that, when I retrieve commands such as those below from my history, the cursor ...
9
votes
3answers
16k 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?
9
votes
4answers
7k 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 ...
9
votes
4answers
12k 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: ...
9
votes
2answers
6k 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?
9
votes
2answers
20k views

Subsystem for UNIX-based Applications in Windows 7

Noticed a thing called Subsystem for UNIX-based Applications in the Turn Windows features on and off dialog under Windows 7. Never seen it before, and it seems interesting. What exactly is it really? ...
9
votes
4answers
7k 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 ...
9
votes
3answers
5k views

How Many Unix Groups Can A User Be A Member Of?

We've recently run into a situation at a group-happy site where some group memberships are not being picked up. I seem to remember that there is an upper limit to the number of groups that a user can ...
9
votes
2answers
22k views

How can I check the user command history in Unix?

I know the 'history' command give me a list of the commands I have typed into the Unix terminal. How do I see the command history for all of the users currently logged onto the system?
9
votes
2answers
3k 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 - ...
9
votes
1answer
3k views

PowerShell vs. the Unix Shell

I've heard some things about the features of the PowerShell. Some of it seems like typical features of Unix shells. So it seems Powershell includes piping and the commandlets, similar to shell ...
9
votes
2answers
6k views

Finding all symbolic and hard links to a file on UNIX

If I have a specific file in a UNIX filesystem, is there a way to use bash to find all links to that file, both symbolic and hard? If I need different commands for each, what are they?
9
votes
2answers
3k views

Practical tips when transitioning to xmonad?

I like the idea and concept of xmonad, however I still keep going back to gnome after an hour or so. This feels like when I first tried to learn vim, but I've gotten past the learning curve point and ...
9
votes
2answers
4k views

Printing pages from 7 to 17 by lpr

How can you print pages from 7 to 17 by lpr?
9
votes
5answers
1k views

Export NFS path containing “-” (dash)

I'm in a bit of a pinch with NFS exports file. Specifically, I can't find a way to export a directory containing "-" in the path name. Manual (exports(5)) states: Also, each line may have one or ...
9
votes
4answers
8k views

How do I set an environmental variable for a GNOME session?

On my system, for apps that use SDL, I need to set an environmental variable: export SDL_AUDIODRIVER=alsa to get the sound to work properly. How do I set up my GNOME session so that this variable ...
8
votes
9answers
6k views

grep all .java files in a directory for a particular string

How would I search all .java files for a simple string (not a regex) in the current directory and all sub-directories on Mac OS X? I just want to print a list of file and directory names that match.
8
votes
3answers
3k views

How to read Unix usage

I did some searching, but I cannot find documentation on how Unix usage works. I know something (mostly through trial and error) but, for example, how do I know that /usr/bin/ls ...
8
votes
4answers
684 views

Unix tools: what if a file is named minus something?

I'm always wondering: most GNU/Unix tools take options in the form "minus something", sometimes followed by an argument. What if you got a file named minus something? $ ls -f $ rm -f $ ls -f $ mv -f ...
8
votes
5answers
3k views

How is \$ being interpreted by grep?

When I write $ grep \$ then whatever I type on terminal, is matched and printed on terminal. How is \$ being interpreted?
8
votes
4answers
1k views

How long is long for the Unix 'file' command?

When you pass a text file to the Unix file command, it might tell you something like: input.txt: UTF-8 Unicode English text, with very long lines Can somebody tell me the minimum number of ...
8
votes
3answers
9k views

How to copy a file without using scp inside an ssh session?

I have logged on to a system with ssh and there is no scp present on both the systems. How to copy a file without using the scp program.
8
votes
1answer
16k 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?
8
votes
5answers
3k views

awk, mawk, nawk, gawk… WHAT?

I've just started learning awk and I'm a little confused about all those versions around. Is there any "version" which is found on all Unix-like systems? Like, you know, plain vi? Does the standard ...
8
votes
3answers
30k 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?
8
votes
2answers
5k views

How can I found out if file is alias or symbolic link?

I'm working on a legacy system and I have a bunch of files that are referencing images that are located in other folders. lrwxrwxrwx 1 user nobody 56 Feb 10 2010 t100x100.jpg -> ...
8
votes
5answers
12k views

sudo chmod -R 777 /

sudo chmod -R 777 / I did this. It was a mistake. Is there any way to undo it? Basically it's messed up more things than I can list. I don't have time-machine enabled on my mac.
8
votes
2answers
2k views

Unix: Slash after directory names or not

What is the difference between the following commands? mv foo bar mv foo/ bar/ mv foo/ bar mv foo bar/ Or is there no difference? Or does it depend on the command being used? Think for example I ...
8
votes
1answer
4k views

Aligning columns in output from a UNIX command

I used to know of a command -- an actual command mind you, not sed/awk magic -- that formatted its input to be aligned in columns. For example, if you ran: % echo -e "aaaaa bbbbbbb\ncc ddd" aaaaa ...
8
votes
5answers
1k views

When would creating a hard link be useful?

There are basically two main limitations with hard links: Hard links normally require that the link and the file reside in the same file system. Only the superuser can create a hard link to a ...
8
votes
3answers
5k views

How do I set up SSH so I don't have to type a password, and without using a public key?

I know there are dozens of questions here about how to connect to an SSH server without typing your password every time, and the answer is always "use a public key." Well, I find myself in the rare ...
8
votes
3answers
3k 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 ...
8
votes
3answers
11k views

Can files deleted with rm -rf be recovered?

When I delete folders or files in through osx terminal using the rm -rf, where do they go? I heard that some say they are deleted directly, but some also say it only "remove the link to the file ...
8
votes
2answers
12k views

groupadd/useradd not found on Mac OSX

Does anyone know how to add unix groupadd command on Mac OSX 10.5? I'm trying to do man on groupadd and useradd commands but it doesn't seem to exist.
8
votes
2answers
6k 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--@ ...
8
votes
3answers
3k views

How can I create a cron job that runs a task every three weeks?

I have a task that needs to be performed on my project schedule (3 weeks). I'm able to set up cron to do this every week, or (for example) on the 3rd week of every month - but can't find a way to do ...
8
votes
3answers
3k views

Is it possible to mount a .tar file?

The only result of any import when I searched for this was from 2001. In the intervening decade, have any tools/methods for mounting a tar file as a filesystem (perhaps utilizing fuse) been created? ...
8
votes
2answers
4k views

Run Script on File Change on Mac OS X

Anyone know about a program for Mac OS that you can pass the name to an executable and a file to watch, so that it then runs the executable everytime the file being watched changed? I have something ...
8
votes
1answer
1k views

STDOUT of a disowned program

As followup of this question, I would like to know where the STDOUT and STDERR of a program on which I've run disown -h is redirected to.
8
votes
1answer
12k views

Console commands to change virtual ttys in Linux and OpenBSD

In Linux one presses Alt-F1, Alt-F2 etc to change virtual ttys. In OpenBSD one shall use Ctrl-Alt-F1 etc instead. My question is if there are console commands for these two operating systems that ...
8
votes
1answer
5k views

sudo chown fails with operation not permitted

I have found similar questions here, but the answers provided to those questions do not resolve my problem. If I do: sudo chown <username> main.m I get an operation not permitted error. ...