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

2
votes
1answer
494 views

Running rsync on network connect

I have one Mac which is always on and is my main computer. I also have a MacBook and I'm trying to sync my iPhoto library. So I can successfully use rsync to sync files. I'm using a cron to have it ...
5
votes
3answers
4k views

Replace spaces in file names from cmd line unix

Hi I have a bunch of files with spaces in the name, is there a way to mv them to new files without spaces in. For example I have the file Hello World.pdf I want to move it to Hello_World.pdf. ...
2
votes
2answers
5k views

How to configure sudoers with path wildcards?

I need sudo for a command for any path under a particular area. Example: sudo mycommand /opt/apps/myapp/... What is the sudoers syntax to allow this command to run in any path that falls under ...
1
vote
2answers
3k views

Schedule a cron job ev X minutes, but exclude it from certain hours in the morning?

Is it possible to make a cron job run say, every 20 minutes, but make it not run for say, 1-4 in the morning.
5
votes
2answers
1k views

How to create shortcut command in Mac

I would like to a shortcut command in Mac as I frequently call commands that are a bit long in Terminal. How can I do that?
2
votes
2answers
895 views

Is there a Unix/Linux platform equivalent to Telligent Community?

Telligent Community combines blogs, wikis, forums, and file-sharing capabilities into a single product with single sign-on, using all Microsoft technologies. Is there an equivalent offering that runs ...
3
votes
2answers
5k views

Which way is the fastest to `dd` to the last 512 kilobytes of disk

I have a 512G disk and I want to clear the last 512k bytes at the end of the disk. I usually clear it by dd if=/dev/zero of=/dev/da0 the whole disk. Which way is the fastest to do this operation?
0
votes
3answers
432 views

Editing/Saving Files live on unix server

I can connect remotely to my unix server via SSH, both ftp and shell mode using port 22. However I am not able to do so in Visual Studio. I want to be able to edit files live in a GUI interface. Any ...
1
vote
4answers
2k views

Sed: Deleting all content matching a pattern

I have some plist files on Mac OS X that I would like to shrink. They have a lot of <dict> with <key> and values. One of these keys is a thumbnail which has a <data> value with ...
2
votes
1answer
85 views

saving the results of the time command while discarding the results of the command being timed (unix)

I'm timing how long it takes to run a command foo. I'm looking to append the results from the time command to a file, and discard the results from the foo command. I tried the following, but it didn't ...
1
vote
1answer
944 views

Rsync: Only preserve meta (time, group, etc) on files and sub-directories, not root directory

I am copying some files (all except hidden ones) using rsync from one place to another using this command: rsync -Cav --delete --exclude=.* /Some/Directory/ other-host:/Other/Directory It works ...
1
vote
4answers
180 views

printing matching lines when greping all files in a directory

I'm searching within Java files for some occurrence of a phrase: find . -name '*.java' | xargs grep -l 'string' How do I change this command to print to the shell all of the lines which contain a ...
27
votes
5answers
14k views

What is the difference between bash and sh?

I see two types of code being used: #!/usr/bin/sh and: #!/user/bin/bash I searched for this online and opinions vary a lot. The explanations I saw on most websites say that sh is older than ...
1
vote
1answer
1k views

Unix: Sync directory with SFTP directory

I have a website on my local computer running Mac OS X. I am wondering if there is any built-in command that I can run in the Terminal that will upload that website to my webserver through SFTP. ...
1
vote
2answers
5k views

Start screen with bash command

I need to start screen with some bash command to execute. I'm trying: screen -S test -d -m bash -c './test.php' but have no result, screen didn't apear. Even more, let's say I need to start ...
10
votes
1answer
2k views

Where is the STDOUT of a disowned program directed to?

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.
5
votes
2answers
3k views

Select text from Terminal.app using the keyboard in OS X

I like to copy things from the terminal, but I don't like to have to move to the mouse. How do you select text in Terminal.app using the keyboard? For example, while in Terminal one might like to be ...
2
votes
4answers
5k views

“eject” command not working

shadyabhi@shadyabhi-desktop:~$ eject -v eject: using default device `cdrom' eject: device name is `cdrom' eject: expanded name is `/media/cdrom' eject: `/media/cdrom' is a link to `/media/cdrom0' ...
3
votes
3answers
187 views

GNU-Screen still has only old groups for my username

I was recently added to a group on the unix server. My active screen session has not been update to the new groups: $groups A B C D $screen -r $groups A B C Without closing my screen session is ...
8
votes
4answers
5k views

Keep a program running after closing a console, after the program has started [duplicate]

Possible Duplicate: How do I detach a process from Terminal, entirely? I've a program running in a Unix console on a remote Unix computer. I (stupidly) didn't run it using nohup &, and ...
18
votes
4answers
21k 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.
3
votes
5answers
275 views

Should I switch to Linux for development? [closed]

Is there any advantage to use a Linux machine to develop instead of Windows? Everyone at work tells me to switch to Linux, since I'm developing hard-core on linux anyway. I manage 40 servers, and do ...
4
votes
5answers
768 views

Automatically wake up notebooks not on the ethernet

I am looking for an automated backup system and I like bacula. I have 3 Notebooks and a Desktop computer that need regular backup. Now I don't want to let them run all night just to do the backuping, ...
2
votes
6answers
3k views

Good ways to restart all the computers in a remote cluster?

I have a cluster that I manage and from time to time I get emails from each node (and head node) begging to be restarted after an automatic upgrade. Currently, my best solution so far is a shell ...
0
votes
1answer
2k views

getting error while doing cat command “Ambiguous output redirect.”

while executing cat test.txt | java myfile > test1.txt 2> test2.txt I am getting error "Ambiguous output redirect." my java file contains System.out and System.err . I am in Unix csh ...
0
votes
7answers
1k views

What does following cat commnad in Unix mean?

What does following cat commnad in Unix mean? I am new to Unix cat test.txt | java myfilegrammar.pcfg > test1.txt 2> test2.txt
9
votes
1answer
7k views

Get exit status of last executed command in Windows?

Is there something like Unix's echo $? in Windows?
33
votes
11answers
32k views

What commands can I use to reset and clear my terminal?

I have been using the command: reset to clear my terminal. Although I am pretty sure this is not what I should be doing. Reset, as the name suggests resets your entire terminal (changes lots of ...
7
votes
6answers
7k views

Is there a standard UNIX tool to repeat a command any number of times?

This is probably dead easy, but is there a simple way to write a command once in the console, and have it executed n times, where n is specified at runtime? Something like this: repeat 100 echo hello ...
9
votes
3answers
37k views

How do I reset the $PATH variable on Mac OS X?

I've messed up my path variable, and now some apps that I run raise errors saying Command Not Found (error 127) for commands like date and sleep. These commands work fine when executed directly in the ...
2
votes
4answers
827 views

Only show hidden files in certain directories

On a Unix system (or more specifically on Mac OS X) is it possible to show hidden files in only some directories? For example as a developer I want to see the hidden files in my Ruby on Rails ...
0
votes
1answer
3k views

Rotate screen using xrandr on Solaris 10

How do I call the xrandr command? I want to rotate my screen 90 deg. clockwise. Here is the usage: % xrandr -help usage: xrandr [options] where options are: -display <display> or -d ...
2
votes
1answer
886 views

Is there an equivalent for AnyDVD on Unix?

What would be the equivalent to AnyDVD on Unix (linux,*bsd etc)?
1
vote
2answers
1k views

sort utility on cyrillic text

I have to sort some lines of cyrillic characters and I want to use the sort utility (on MAC OS X 10.6). The problem is that result is incorrect. I take the text into clipboard, then run pbpaste | sort ...
0
votes
3answers
1k views

XDMCP is slow any ideas? (looking for alternative remote desktops)

I've been used to using RDP on Windows to remote to machines, and I've got an asus eee 701 which I want to use to do some *nix programming on. While the eee is a lovely little machine the screen and ...
0
votes
2answers
348 views

Selected text gets automatically copied in Vim

Whenever I select something in visual mode in Vim it automatically gets copied. It causes a problem since I have alread something in clipboard to paste in that selected text. Is there any way to ...
14
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 ...
0
votes
1answer
72 views

Can MS Services for Unix be deployed and accessed from a shared drive?

I'm interested in experimenting with replacing our dependency on MKS with MS' Sevices for Unix toolset. I was wondering if anyone has any experience with deploying SFU on a shared drive? We like to, ...
10
votes
5answers
5k 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 ...
0
votes
1answer
1k views

Vim: Custom Folding function done, custom highlighting required

I have defined a function in vim to properly indent folds. Ie so they look like this: Unfolded this is text also text indented text indented text not indented text folded with default ...
6
votes
2answers
3k views

Syntax for find on Mac OS X

I have a project directory that contains source code and subdirectories of source code. I want to use the Unix program find to search recursively for the names of files of certain extensions. The ...
6
votes
6answers
11k views

How do I set $ variables in unix?

For example there is a long path that I cd to very often. How do I store the path in a variable so that I can use it everytime? For example: I wan to be able to do this cd $path instead of cd ...
3
votes
7answers
3k views

UNIX find dirs that contain a particular file (pom.xml) then execute command in that dir

I want to, from a root dir, find all dirs that contain a certain file name (pom.xml), then cd to that dir and execute a command. I can do this in a script but I was hoping to do this with a single ...
5
votes
3answers
192 views

Why does this bash command take up all space on device?

I'm a little new on searching via bash, so feel free to give me suggestions on the methods to use instead of this, which I'll never use again. I'm searching for occurances of a string, recursively in ...
5
votes
5answers
306 views

Linux/Unix in Windows

What would be the best way to get the full-blown Unix/Linux bash inside Windows? I don't mean the Virtual Machine, but rather only the terminal with mounted NTFS drives. This way I could use the ...
1
vote
1answer
202 views

Unix: Overloading Aliases

What happens if I have this in my bashrc: alias ls="ls -l" alias ls="ls -a" when I type ls they will both match. Is the last one kept or both?
4
votes
1answer
331 views

Unix: softlinks, hardlinks

I am somewhat confused what the differences between a softlink, and a hardlink are (on unix). It seems like a softlink is the same as a shortcut in windows or an alias on Mac OS X. (Can someone ...
0
votes
1answer
335 views

Why does cpio say “WARNING! These file names were not selected” when copying a large number of files?

For over 10 years, I've been using this strategy to copy a large number of files between UNIX filesystems: cd source_directory find . -depth -print | cpio -pdm /path/to/destination_directory It ...
1
vote
4answers
15k views

How to recode to UTF-8 conditionally?

I'm unifying the encoding of a large bunch of text files, gathered over time on different computers. I'm mainly going from ISO-8859-1 to UTF-8. This nicely converts one file: recode ISO-8859-1..UTF-8 ...
3
votes
1answer
738 views

Unix commandline to repeat command with pipes

I want to write a script that will repeat a commandline that usually contains pipes ./myscript.sh ls -lart |grep ^d And in myscript.sh I do a bunch of stuff, and then want to execute ls -lart |grep ...