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

23
votes
13answers
8k views

Non-Windows, non-Unix-like OS's?

Since most operating systems I've heard of besides Windows seem to derive their heritage from Unix, I've been curious whether any OS's with the following characteristics exist: Not generally ...
23
votes
6answers
14k 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 -...
23
votes
2answers
19k 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?
23
votes
6answers
2k views

Learning the basics of Linux/Unix [closed]

I would like to learn the basics of Linux; In contrast to tutorials that teach how to do common tasks with Ubuntu or something. I'm looking for a structured introduction, not a reference. Also I would ...
23
votes
2answers
3k views

Is there a git-like file system?

Git stores content uniquely in its repo based on the calculated hash of any file. If my directory has two copies of the same file somewhere inside it, git will only actually store it once. I am ...
23
votes
4answers
45k 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 ....
23
votes
0answers
24k views

ls -la symbolics… what does that last symbol mean?

Possible Duplicate: what does the @ mean on the output of ls on os x terminal? when I type ls -la I get this familiar output... drwxr-xr-x+ 38 kent staff 1292 Nov 6 11:09 . drwxr-xr-...
22
votes
7answers
3k views

Is there a standard unix program that returns a range of numbers

Im learning shell scripting from an outdated textbook, and it seems to me like it'd be really usefull to have a program that just returns a string of numbers delimited by spaces something like $ ...
22
votes
5answers
30k views

tar – extract discarding directory structure

unzip has a nifty option -j, whereby the directory structure of the archive is discarded, and all files are extracted into the same directory. Is there a way of making tar work in the same way? ...
22
votes
2answers
9k views

Can the output of one command be piped to two other commands?

How can I pipe the output of one command to the input of two other commands simultaneously?
22
votes
2answers
32k 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, ...
21
votes
5answers
3k views

Are Linux commands interchangeable with Unix commands?

I find that some commands, for example, ls and pwd, can be used on both Linux and Unix systems. Is it that all Linux commands can be used in the Unix systems, and all Unix commands can be used in ...
21
votes
8answers
7k 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 *...
21
votes
5answers
30k 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.
21
votes
2answers
37k views

downloading file using scp command

I have a centos server lets say with ip: 1.2.3.4. I want to download a file from 1.2.3.4 at path /root/pc/filename.rar to my localhost host (current pc). What command I need to download that file? I ...
21
votes
3answers
11k views

Random password generator: many, in columns, on command line, in Linux

A while back, I came across a random password generator for the command line that displayed a grid of "memorable" passwords. Output was something like this: adam@host:~$ CantRememberThisCommand ...
21
votes
3answers
7k 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
4k 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
4answers
24k 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.
20
votes
1answer
27k 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 ...
19
votes
5answers
30k 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?
19
votes
6answers
16k 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 ...
19
votes
4answers
20k views

Users don't appear in /etc/passwd on Mac OS X

By examining the /etc/passwd file, 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: ...
19
votes
5answers
20k views

Is there a way to edit files inside of a zip file without explicitly extracting them first?

I sometimes need to make changes to a .zip or .jar file, so I usually move the file to /tmp, extract all the files with unzip, edit a few files, and then re-zip up the files. This works, but it can ...
19
votes
2answers
20k 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 /...
18
votes
4answers
715 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 accidentally ...
18
votes
3answers
27k views

How to split big files on MAC?

I have a 5 GB file on my MAC and can not copy it on flash memory or external hard formatted with FAT. How I can split it to some smaller files
18
votes
2answers
38k 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?
18
votes
4answers
13k 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 ...
17
votes
5answers
4k 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
3answers
43k 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 ? ...
17
votes
5answers
18k 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?
17
votes
4answers
7k 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.
17
votes
3answers
19k 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 ...
17
votes
4answers
25k views

Check if any of the parameters to a bash script match a string

I'm trying to write a script where I want to check if any of the parameters passed to a bash script match a string. The way I have it setup right now is if [ "$3" != "-disCopperBld" -a "$4" != "-...
17
votes
9answers
8k 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 ...
17
votes
2answers
651 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 ...
17
votes
2answers
10k 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 ...
16
votes
5answers
42k views

How do I password protect a .tgz file with tar in Unix?

I'm using the Unix tar command as follows to tar up a directory and its files: tar cvzf fileToTar.tgz directoryToTar Is there a way to password protect the .tgz file? I've created password-...
16
votes
7answers
17k 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 ...
16
votes
2answers
17k 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
3answers
65k 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?
16
votes
2answers
5k 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 ...
16
votes
5answers
8k 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 ...
16
votes
3answers
8k 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? ...
16
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
3answers
6k 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 [-...
15
votes
5answers
20k 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 ...
15
votes
6answers
1k 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 ...