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

0
votes
0answers
4 views

How does UNIX know which private key to look for?

I have a public/private key pair. I put the contents of my public key into my server's .ssh/authorized_keys file. When I SSH into it, it automatically recognizes my key and lets me in. However, if I ...
1
vote
1answer
1k views

Debian - IPv6 disable 'Stateless Address Autoconfiguration'

I've installed Debian 6.0.6 running on kernel 2.6.32-5-amd64 and after the installation I assigned a static IPv6 address to the eth0 interface. This is how my /etc/network/interfaces file looks like: ...
0
votes
2answers
23 views

Unable to SSH, cannot create /dev/null/.ssh

I am trying to deploy hadoop with a master and slave node. But the master fails to start tasttracker and datanode processes in slaves, as it is not able to ssh into slaves. The error message is 'Could ...
-1
votes
0answers
6 views

Logging in to putty by sesu as superuser and running commands

I need to automate using a bat file where I need the following things to be done: log in to server using putty/plink sesu to super user run certain commands get the outpout in a text file I can ...
2
votes
4answers
3k views

How does unix search for executable files?

When a file is executed, how does UNIX search for it? If there are multiple executable files in PATH with the same name which one is preferred? Is current directory included in the search when file is ...
2
votes
0answers
34 views

Allow user to traverse path to given directory

Say, I want to give a user colleague read access to a directory /rather/long/path/to/the/directory, but not necessarily to its parent directories. As explained for example here and there, I first ...
0
votes
0answers
30 views

Can't build using MacPorts in OS X

I've submitted a ticket here, but I am pretty pessimistic it'll be addressed. As I say, there, I'm running MacPorts 2.3.1 on OS X 10.9.3. In trying to install llvm-3.2, I get the following error: ...
0
votes
1answer
14 views

Sudo Mv Renaming Mess Up

Okay, first things first Mac OS Mavericks MacBook Pro. Now, I used sudo mv to rename my Desktop and user folder. NOT the folder actually called user, but my user within that (it was neomartinson). ...
1
vote
1answer
32 views

Show one folder's content in other folder

My question is about Linux. I have 2 folders - /home/user/first and /home/user/second. In the /home/user/first there are some files. The second folder is empty. What I want to do is to have ...
30
votes
2answers
5k views

'less' command clearing screen upon exit - how to switch it off?

How to force the less program to not clear the screen upon exit? I'd like it to behave like git log command: it leaves the recently seen page on screen upon exiting it does not exit the less even ...
0
votes
2answers
91 views

Linux move files from specific directory one directory up and delete empty folder

I need to move files out from a directory inside a directory inside a directory and remove folder that I move them from. I would need a recursive script. The directory structure: ...
58
votes
5answers
41k views

How to copy with cp to include hidden files and hidden directories and their contents?

How can I make cp -r copy absolutely all of the files and directories in a directory Requirements: Include hidden files and hidden directories. Be one single command with an flag to include the ...
1
vote
3answers
2k views

Modification of files with 777 permissions but not with 755 permissions?

I can modify the files with 777 permissions, but not with 755. I do it by sourcing some sed commands. I find it odd because I can modify the files with even 700 permissions in Vim. Why is it not ...
0
votes
1answer
20 views

Keep only latest two folders in the directory

I have a directory which has the following folders. Data-2014-07-10-0240 Data-2014-07-10-0340 Data-2014-07-11-1232 Data-2014-07-12-0530 Data-2014-07-13-1210 I want to keep only latest two folders ...
0
votes
1answer
58 views

All steps to set up and resolve subdomain.localhost to 127.0.0.1?

I suddenly feel stubborn about my subdomain on localhost not working. My /etc/hosts file looks like this: 127.0.0.1 localhost 255.255.255.255 broadcasthost ::1 localhost fe80::1%lo0 ...
1
vote
4answers
2k views

How to use “find” command with several conditions?

This command will print the *.cpp filenames in the given directory: find . -name "*.cpp" -print How can I print both *.cpp and *.h filenames?
1
vote
0answers
25 views

sed, insert file before last line

The following inserting file method for sed used to be working, even before last line, but not any more. Is it a bug in the current sed? Demo of inserting file method with sed: mkdir /tmp/test ...
0
votes
1answer
2k views

CYGWIN SSHD service not starting

To setup Hadoop I am installing CYGWIN on my 32 bit Windows 7 machine. It has installed successfully without any error. CYGWIN Setup version : 2.774 $ uname -r : 1.7.17(0.262/5/3) SSHD installed ...
1
vote
2answers
1k views

Generating a timestamp to usec accuracy in shell (Busybox)

I want to generate a textual timestamp in the unix shell with microsecond accuracy, without using the %N date option (I am using busybox, a smaller unix toolset that does not have this option), to ...
0
votes
2answers
21 views

Head of ssh file resource

Sort of an odd question, but is there some way that I can operate on remote resources as UNIX files? E.g. I'm looking for some way to do tasks like the following: head ...
0
votes
1answer
31 views

Can I restore a Unix server by copypasting system directories from a backup?

I messed up a Ubuntu server with lots of installed binaries, settings, etc. I'm going to have to reinstall Ubuntu, but I have a complete backup, hidden files and all, though not bootable. I'm hoping ...
2
votes
2answers
73 views

How do I scan network requests of a software connecting the internet?

I'd like to know some way to scan programs networking activities. I mean record outcoming data sent by a program (e.g. program updater or a program itself). I guess this could be done using Wireshark ...
86
votes
15answers
41k views

How to execute a command whenever a file changes?

I want a quick and simple way to execute a command whenever a file changes. I want something very simple, something I will leave running on a terminal and close it whenever I'm finished working with ...
6
votes
4answers
5k views

Unix command-Line CSV viewer

Is there a convenient command-line csv viewer, possibly a unix tool or a mod of some tools (e.g. vim or python)? I find it easy to simply edit CSV files by writing it manually (since all you need to ...
3
votes
1answer
22 views

Using pv(1) to limit rsync speed

I'm trying to use pv rather than rsync's builtin --bwlimit to limit the bandwidth of an rsync transfer because --bwlimit is implemented in an eventually-consistent way, and my transfers are so short ...
0
votes
1answer
13 views

Escape brackets when using SED

I would like to replace the value varchar(36) with char(36) in a file by using sed. I am trying with sed -i ’s/varchar(36)/char(6)/g’ calls_contacts.sql But the command does not execute. What am I ...
0
votes
3answers
2k views

Where does SecureCRT save usernames and passwords?

If I check the checkbox remember my password on SecureCRT which file does SecureCRT write my username and password to?
2
votes
1answer
12 views

df -h Size - User != Avail

When I run df -h I get the following Filesystem Size Used Avail Use% Mounted on /dev/sda3 809G 753G 14G 99% / But Size - Used is not even close to Avail (809-753 = 56 ...
0
votes
0answers
8 views

How to query mssql db from bash on subsystem for unix

I have a script that is used to query a database and use the result set for further processing. This is a shell script that runs on bash. But the bash used is the one shipped in subsystem for Unix for ...
2
votes
7answers
2k views

Building Unix/Linux programming environment for a Windows developer

I have been a Windows C++/.NET developer for a few years, and would like to start C++ programming in Unix environment. What I think I have to do is to create Virtual Machine, install the version of ...
1
vote
3answers
2k views

How to set tab to 4 spaces in vim?

By default, the space in vim is set to 8 spaces. How can we set the tab to 4 spaces in vim permanently?
1
vote
1answer
11 views

tmux: close session while open

I am using tmux to manage multiple terminal windows. Currently I have 2 windows open with multiple panes. How can I close the session from inside of tmux. I know that I have to use the prefix (for me ...
3
votes
0answers
454 views

Unix: “ls” command shows files with ? after the extension [migrated]

I have written a shell script (test.sh) using Java. This shell script actually does a copy job from one file to the other. After the execution of the shell script I have opened the directory from ...
23
votes
3answers
17k views

Find out if user name exists

How can I find out, in a shell script, whether a given user name exists on the current system? /etc/passwd and /etc/shadow are incomplete. Consider OS X's Directory Services, or Linux with Likewise ...
35
votes
12answers
44k views

Unix/Linux find and sort by date modified

How can I do a simple find which would order the results by most recently modified? Here is the current find I am using (I am doing a shell escape in PHP, so that is the reasoning for the variables): ...
1
vote
1answer
14 views

Binary file on Linux machine looking for libraries in /lib by default

On my UNIX machine I observed that the binaries are looking for the dependent shared libraries in '/lib' directory by default even though the '/lib' directory is not configured in 'PATH' and ...
45
votes
2answers
21k views

Why does Windows use backslashes for paths and Unix forward slashes?

It annoys me having used Unix in college and now working on the Windows side. What's the history behind this decision? Anyone know why it worked out this way?
0
votes
1answer
16 views

Switch from ZSH to default OS X

http://stackoverflow.com/questions/13476232/make-iterm2-launch-with-zsh I used chsh -s /bin/zsh as described above to set zsh as default. I'd like to switch back to default standard terminal that ...
81
votes
6answers
51k views

What's different between Ctrl+Z and Ctrl+C in Unix command line?

I'm using Mac OS X Terminal. And I use Ctrl+Z or Ctrl+C to stop some programs. But I realized that I don't know what they're exactly doing. What are they and what's the difference between them? ...
7
votes
7answers
4k views

Screen Capture - command line?

Is there a command line tool out there that can record your computer screen and audio device and then save that to a file?
0
votes
1answer
3k views

ksh Auto-Completion PuTTY Configuration

I'm having a bit of a problem configuring my PuTTY client to work with the auto-completion feature in the ksh shell. I do a listing on the root with the directories /home and /homeroot and it returns ...
0
votes
2answers
29 views

Mac addresses of devices on network

I'm on OSX Mavericks. I'm connected via wifi to my network. How can I find the mac addresses of all other devices on the network?
33
votes
3answers
64k views

How can I make chown work recursively?

I've got a directory called pdfs that contains a bunch of sub- and sub-sub-directories. I want to change ownership on all PDF files in all of the subfolders. I just tried this: chown -R ...
1
vote
4answers
850 views

Batch renaming of files using regular expression in Unix

I have several thousand files of the form: [8-digit number]_[number I want]_S60491_I129111.dcm. I wish to remove everything except the number I want, and use that as its name. In Ruby, I can get to ...
1
vote
3answers
2k views

Term Enviroment Variable not set, when executing a Bash File via SSH

i am trying to run a bash script on a remote machine. If I open a ssh connection in a terminal, i can easily run the script. But when i run it like that: ssh user@ip < /etc/script I get an ...
0
votes
0answers
8 views

Fail all login attempts from an IP address or IP range [duplicate]

I am noticing a large number of failed login attempts from a range of IP addresses (starting with 117.) How can I automatically fail all login attempts from this range?
1
vote
3answers
40 views

Is there anything grep does better than ack? [closed]

I started using ack a while ago and it's amazing, but still begs the question: Is there anything grep still does better than ack? Or maybe is there something grep does that ack can't do?
0
votes
0answers
6 views

Homebrew App Not Using Python Package

I installed duply using Homebrew and tried to create a backup to Google Drive. Doing so results in the following error: BackendException: Google Docs backend requires Google Data APIs Python ...
0
votes
0answers
11 views

How can I browse through Homebrew's formulae according to popularity (# downloads all time)?

Though I can easily find an alphabetical list of all available formulae, there seems to be no resource online, including at Brew's Github, or seemingly anywhere where I'm able to browse through ...
0
votes
1answer
3k views

Setting timezone in AIX

The timezone is set to "CET" but date displays CEST $ echo TZ CET $ date Tue Apr 16 15:56:57 CEST 2013 Noticed the timezone on another similar system is "CET0" (not sure what the 0 means here!). ...