0
votes
1answer
33 views

What should the permissions be on for PostgreSQL /data files?

I installed Postgres 9.3 from the osX binary. When I attempted to restart using pg_ctl restart, I received the following error: $ pg_ctl restart pg_ctl: could not open PID file ...
1
vote
2answers
140 views

SSH Tunnel or Reverse Tunnel

I'm trying to establish a SSH tunnel to allow VNC/ARD connections (ports 5900 and 3389). However I'm uncertain about a certain thing: Let's say machine A has IP 192.168.103.1 and has services running ...
5
votes
2answers
147 views

Trying to delete a directory stored on a Windows server, from on a Mac, containing files created on the Mac, getting “Directory not empty”

I am trying to delete a directory stored on a Windows 2008 R2 server, mounted on a Mac as network home (10.8.5). The directory was created by Safari and stores temporary internet files. I need to be ...
0
votes
1answer
144 views

automatically start and and selectively stop multiple instances of couchdb on osx

I have successfully installed couchdb via homebrew: % brew install couchdb ...and invoked mutiple instances as directed here: % OLD=/usr/local % NEW=/tmp/couchdb % mkdir -p $NEW/etc/couchdb/ % ...
0
votes
1answer
100 views

how to tar or zip two sibling folders and avoid an extra top level folder when extracting

I have a need to create a tar of two sibling folders and send it to a client for extraction on their Mac OS desktop by double-clicking it. yes, that's a requirement of theirs. so I go: cd ~/Desktop ...
2
votes
2answers
1k views

Cannot ping over LAN until a ping is received

I have two OSX machines on a local subnet. Pings from Machine A to Machine B consistently timeout until Machine B pings Machine A. After B pings A, A can successfully ping B, but this success is ...
0
votes
2answers
82 views

Prevent user from running certain commands

Does anyone know of a way to prevent a user from running certain commands? For example, I would like to prevent users from copying data to and from the server without going through our SVN repo. (svn ...
1
vote
1answer
173 views

Data loss through permissions change?

I seem to have deleted some files on my media drive, simply by changing the permissions. The Story I have many operating systems installed on my computer, and constantly switch between them. I ...
8
votes
3answers
1k views

OS X: What does the '@' attribute on a file mean?

On a Snow Leopard machine, at the Terminal: la ~/src/rmcl/ | grep RMCL -rw-r--r--@ 1 claytonstanley staff 6766167 Nov 13 2009 RMCL What is that '@' attribute? This file is part of an older OS ...
3
votes
3answers
293 views

rsync --link-dest behaviour when run as sudo

In order to create regular backups, I'm using rsync together with --link-dest so as to create hard-links for unchanged files. For example: rsync -ax \ --partial --delete --delete-excluded ...
0
votes
1answer
581 views

Why does “cp -Rp ~/foo /Volumes/KINGSTON” give “cp: chflags: /Volumes/KINGSTON/Proj/Proj/Color.h: Invalid argument” [closed]

This is on Mac OS X Lion, and I use the following to back up a project folder cp -Rp ~/foo /Volumes/KINGSTON or cp -a ~/foo /Volumes/KINGSTON The -p or -a is so that the timestamps of the files ...
1
vote
2answers
289 views

How to Jail certain users in ProFTPD on Unix (Mac OSX)

I have ProFTPD set up so that I can remotely upload new php files and suchlike to my htdocs on my server. That's all fine, but I would like to jail the 'nobody' (No write, Read/Download only) user ...
4
votes
3answers
174 views

Moving files off volume and then back on while preserving all attributes?

I have a situation where I'm testing a new filesystem that has an issue with some metadata. All of the files are intact, however I ultimately have to effectively move every single file off to another ...
2
votes
3answers
447 views

Give apache write access to DocumentRoot on dev server

I've got apache running on my mac workstation (OS X 10.7, with the pre-installed copy of apache), and our web applications require write access to certain sections of the filesystem to run (usually ...
1
vote
3answers
261 views

Why is my mv renaming for a directory not working?

$ mv 'Assignments' 'assignments' mv: cannot move `Assignments' to a subdirectory of itself, `assignments/Assignments' Trying to rename Assignments directory to assignments
0
votes
1answer
163 views

SFTP on Unix defaults to Key Authentication

This is probably a simple one for all you Unix whiz' out there, but I can't figure it out, so I am trying to sftp into a windows server from the command line, and the remote refuses connection. When I ...
2
votes
5answers
906 views

Safe way to determine size of a file using unix tools?

I wonder, what's the best way to determine the size of a file using common unix tools. I need to determine the size of a file in bytes in a shell script. The problem is, that the shell script needs to ...
2
votes
0answers
216 views

Umlaut encoding: tar on Mac Lion

I have a tar archive created on an old Unixware machine using ISO8859-1 encoding. When I try to extract it under Macosx Lion, I experience a bit of weirdness with German umlauts. For instance: I open ...
0
votes
1answer
146 views

How can I run terminal commands at startup on a Mac OSX server?

For example, when the server boots I need to start Tomcat, and I need to start an Android emulator, and then issue some commands to it. These are on the path already. I'm familiar with Linux and ...
1
vote
2answers
234 views

Accidentally overwrote file instead of appending. Is there hope?

I accidentally did this: command > ~/.bash_profile Instead of command >> ~/.bash_profile I know, I'm an idiot. Is there a way to recover the old .bash_profile file? Thanks a lot for ...
3
votes
4answers
211 views

What is the canonical /portable means of determining ONLY the ip of an interface

I'm writing some setup scripts/documentation and I want to dynamically set the listen ip for a service, given that I know that a particular network interface will be on a particular network. There are ...
1
vote
3answers
6k views

-bash: apt-get: command not found

Over the course of uninstalling the HP/palm enyo SDK and installing node JS I somehow goofed up something (I think my path). Now when I try use apt-get I get the following: -bash: apt-get: command ...
0
votes
1answer
44 views

Read input to a file

I'm looking for a unix command that is the opposite of cat (but not tac). I want to do $ SOMECOMMAND /tmp/file I type some content for the file here ^D $ cat /tmp/file I type some content for the ...
0
votes
2answers
306 views

Days since a specific date

How to print in linux/unix bash the number of days since a specific date till now? (for example days since 23rd of June 2009 till today)!
3
votes
3answers
6k views

Why is “chroot” never used on Mac OS X?

I've been using Macs for 25 years, and "UNIX" since OS X 10.0.. but I've never really thought much about chroot, nor have I ever really needed or wanted to... It's a simple question, but... under ...
0
votes
1answer
1k views

How to connect to remote server using mac osx terminal and .ssh file?

Hey Guys. Just like in the title - do you know how can I connect to remote server using the .ssh file? This file was given to me by a third party company in order to connect to their server via ...
0
votes
2answers
561 views

Which DHCP clients use which options?

I would like to use my DHCP server to give information about some local services like ntp, using DHCP options as explained in the dhcp-options(5) manpage. Does anyone here know, or is there a good ...
1
vote
1answer
486 views

Copy File Contiguously to Disk from OSX/Unix/Linux to FAT32 FS?

So the Sysinternals guys have that cool contig.exe utility that allows me ensure a file is contiguous. I need to copy overs ISO files to a FAT32 USB flash key. Grub4DOS requires the files be ...
1
vote
1answer
145 views

Linux / UNIX / OS X Binary Directory Structure

Will Linux / UNIX / OS X binaries be stored in the same directories across different platform or distributions? I'm asking because I need to have access to uuidgen (stored in /usr/bin/uuidgen on my ...
0
votes
2answers
138 views

Unix/Linux/MacOSX online training

I am a web dev seeking deep knowledge of the Unix-style command line. Please if anyone has a recommendation on any high quality courses avail. over the web respond to this thread.
1
vote
2answers
5k views

What causes Permission Denied when doing an ls on a symbolic link, when the underlying file has 'r' granted to all?

Not sure if this belongs here or on superuser.com. I'm battling with getting a C process working that needs to link in Oracle dynamic libraries. It compiles and runs fine under the oracle user (the ...
2
votes
2answers
127 views

Safely deleting all files of a given name

On Mac OS X, .DS_Store files seem to contain custom view settings for the directory when it is viewed in Finder (file manager GUI). I want every directory to use my default view settings. Is this ...
10
votes
4answers
7k views

How can I run mongod in the background on unix (mac osx)?

I would like to run mongod in the background as an always present sort of thing. What would be the best way to do this? Kind of like the way I can run MySQL on startup and it's just always there ...
0
votes
1answer
603 views

How do I get Apache 2 to read this directory?

I'm on Mac OSX and i I have apache2 installed via MacPorts, running as the _www user. I have some files I want to serve in the /Users/Me/Documents/abc folder. Right now, though, the permissions of ...
62
votes
13answers
54k views

In my /etc/hosts/ file on Linux/OSX how do I do a wildcard subdomain?

I need to test sub-domains on my localhost. How can I effectively have this result of adding *.localhost.com to m /etc/hosts/ file? If it's not possible, how do I work around this problem? I need ...
1
vote
2answers
316 views

Is it a good idea to chmod my Python site-packages directory to 777?

I use Python on Linux and OS X, and I'm trying to think of a good reason not to chmod my Python site-packages directory to 777. It seems like that is better to do than sudoing every time I want to ...
1
vote
2answers
111 views

How to get a man page for manually compiled software?

I'm using Mac OS X and I manually compiled llvm and clang because they were not available from MacPorts (a package manager). I presume clang has some kind of man page. How do I install and/or ...
1
vote
3answers
7k views

Getting full path of executables in ps auxwww output

Consider the following lines from a "ps auxwww" output: USER PID %CPU %MEM VSZ RSS TT STAT STARTED TIME COMMAND root 4262 0.0 0,1 76592 1104 s005 Ss 10:02am ...
37
votes
10answers
8k views

Learning to compile things from source (on Unix/Linux/OSX)

While I install software from packages (MacPorts / apt-get) where-ever possible, I often find myself needing to compile packages from source. ./configure && make && sudo make install ...
20
votes
4answers
17k views

How to sort ps output by process start time?

Is there a way to sort ps output by process start time, so newest are either at the top or bottom ? On Linux ? On SysV5 ? On Mac ?
1
vote
3answers
710 views

What's the shortest command to find a volume's BSD device name ( /dev/disk*s* )?

What's the easiest way to find out that, for example, /Volumes/Foo lives in /dev/disk0s2 ? EDIT: mount is probably a more semantically satisfying answer, but it doesn't get much shorter than df
1
vote
1answer
715 views

Installing and maintaining Apache, MySQL, PHP on OSX

I have recently gotten into quite a predicament with my MacBook: I'm not quite sure how many or what versions of the AMP stack I currently have installed. In addition to the default stack that comes ...