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

Who was the original author of logrotate and what year was it written? [migrated]

The question started as an internal team debate. But we realized we couldn't find any information about when the original version of logrotate was authored and who wrote it. Any idas?
0
votes
1answer
24 views

Run a script in /etc/motd

I'd like to run a python script when people log in to the server. I thought editing /etc/motd would be the best approach, but since it's only readable file, that won't work. I found pretty much ...
1
vote
1answer
31 views

What rsync options to use for the below mentioned scenario?

Greetings !!! This is regarding a specific requirement about rsync that we are trying to achieve. We have tried to achieve this by using various rsync options. However, we are encountering different ...
2
votes
1answer
1k views

Linux- Permission denied?

I'm installing Neo4j server as a linux service, but when I install it, I get the following message: /sbin/insserv: Permission denied What is this? What should I do? I'm running everything with ...
0
votes
4answers
4k views
4
votes
3answers
2k views

ssh still accepts password authentication despite being configured for public-key only authentication (which works!)

I have configured an Ubuntu 10.04LTS desktop install to only allow public key authentication. RESULT: public key authentication works perfectly! QUESTION: The problem is that despite being ...
0
votes
3answers
35 views

sed replace unix path with variable that contain another unix path [on hold]

I need to replace Unix path via sed with variable that contain another unix path in a bash script Example: another_unix_path=/another/unix/path sed -i 's/ \/some\/path\/file.txt/ ...
23
votes
6answers
3k views

Can a program tell it is being run under sudo?

I have a program that should behave differently if it is being run under "sudo". Is there a way it can find out if it was run under sudo? Update: Someone asked why would I want to do this. In this ...
7
votes
7answers
4k views

In *nix, how to determine which filesystem a particular file is on?

In a generic, modern unix environment (say, GNU/Linux, GNU/Solaris, or Mac OS X), is there a good way to determine which mountpoint and filesystem-type a particular absolute file path is on? I ...
2
votes
4answers
3k views

Unix Snoop Command

Doing testing on a server right now. Both the client and server are on my machine. I am trying to snoop the packets between them but am not having any luck. These are some variations I have tried: ...
2
votes
3answers
6k views

How do I load the dump.rdb file into redis?

I have a dump.rdb file, which is in the same directory as redis.config. When I start my sever: redis-server ./redis.config It does not load the data in that 1 GB file. How do I load that data?
2
votes
2answers
41 views

error: no space left on device when saving file (but there is space)

I am implementing in ruby however when I want to save my work I get "Opening output file: no space left on device, /afs/edu/usr7/ael/p\ rivate/RUBY/inc.rb" When I checked if I got any space using ...
0
votes
1answer
23 views

sftp: get file by mtime

Objective: Connect to sftp server with very simple script using -b option, cd to directory and get file with the latest modified time or created time. I can connect and download *.csv but that may ...
13
votes
6answers
1k views

Building a Linux Network for Our Company - Where Do I Start?

This is going to be a somewhat loaded question. I am programming in a company that has been around since 1962. A lot of things, especially computer / network stuff, is very dated. Let me give a bit ...
0
votes
2answers
34 views

is it possible to combine files system from different servers and present it as one?

I have 3 physical servers (server01, server02 and server03) and local storage. I've created /app file system on all of three servers and mounted the storage there. I need to be able to combine /app ...
0
votes
0answers
31 views

cron job doesn't run under specific account

I have a crontab entry on my RHEL 5.4 system under the "oracle" account but it never seems to actually run. I have the following entry: * * * * * /home/oracle/blahblah.sh > /tmp/test.log ...
2
votes
1answer
42 views

Create a Windows shortcut on Unix [duplicate]

I'm looking for a tool that will allow me to create Windows shortcuts on a Unix (BSD) machine. Can anyone point me to one? Thanks in advance.
0
votes
0answers
39 views

syntax error at line 10: `fi' unexpected [migrated]

CorrectInstance=DEV Instance_Name=DEV if [ $Instance_Name == $CorrectInstance ] then echo "Instance validated sucessfully" else echo "Instance validation failed. Script exited." exit fi ...
1
vote
1answer
25 views

how to run nohup when prompted for password and/or input parameter

I typically use nohup like so: nohup ./myscript.sh 11111 > nohup.out & Where 11111 is an input parameter. In this case, the application is prompting for a password and I'm unable to use ...
3
votes
4answers
6k views

How do I connect to a server behind an socks5 proxy through SSH on mac/linux?

I am using the ssh to try to connect to a server behind on remote network. That server is behind a socks5 proxy on the same network. The port of the proxy server is 1080 and the ssh port is 22. ...
0
votes
1answer
17 views

Not able to restrict the user to particular directory in unix

Below are the steps I performed: I created group sftponly. Added one user named sftpusers to that group. Added Subsystem sftp internal-sftp to file /etc/ssh/sshd_config Added this line to the file ...
0
votes
4answers
661 views

How to remove empty/blank lines in a file in Unix?

How do I remove empty/blank (including spaces only) lines in a file in Unix/Linux using the command line? contents of file.txt Line:Text 1:<blank> 2:AAA 3:<blank> 4:BBB 5:<blank> ...
7
votes
2answers
17k views

In unix/linux, what is the proc directory for? why does it exists? [closed]

In unix/linux, what is the proc directory for? why does it exists? What can I use it for (if not just for the system)?
0
votes
2answers
484 views

NFS server in Vista?

Does Vista Ultimate features a NFS server? I have very little experience in this area, but I have a unix-based device which can mount nfs shares and I would like to serve files to it. Is this possible ...
8
votes
1answer
224 views

su: /bin/bash: Resource temporarily unavailable

Unable to switch user to postgres. Ulimit settings for postgres user is set with reasonable limits. We are not hitting max. No errors in /var/log/messages. Error: BETA -bash-4.2# sudo su - ...
2
votes
2answers
388 views

Blocking rm -rf for application

I have application which during run-time generates interesting intermediate outputs to ./tmp directory. At the end of execution this directory is deleted. How can I preserve contents of it? I do not ...
4
votes
3answers
16k views

Move files to another directory which are older than a date

I am looking for a solution to move files that are year older from today. My log partition is getting full, but I can not remove them. They are needed for a long long time. Anyway one solution I came ...
2
votes
1answer
48 views

LUKS full disk encryption use keyfile instead of passphrase

I have enabled LUKS full disk encryption on an LVM volume while installing centos6.6, however it asks for a passphrase every time the OS is rebooted. I am now trying to use a key file according to ...
1
vote
0answers
16 views

Gitlab custom hook issues

I am implementing a custom gitlab hook. While some one pushes in master, I want to update a specific file. Then commit this change and push it to remote origin. The hook looks like below: ...
5
votes
4answers
10k views

In unix, what's the best way to reduce the size of a massive log file that is actively being written to?

On a linux server, I want to reduce the size of a log file which is several GB big. Cutting off the top half, or maybe the first million lines would work.
2
votes
1answer
5k views

How do you configure X11 forwarding over SSH on AIX?

Here is what I've tried. I've edited /etc/ssh/sshd_config on the remote AIX system X11Forwarding yes X11DisplayOffset 10 X11UseLocalhost yes as well as set $DISPLAY DISPLAY=localhost:10.0 export ...
2
votes
5answers
159 views

How to make desktop notifications from long-running shell commands? [closed]

I'm currently trying to configure sphinxsearch. The indexing takes around 7 minutes. Too long to wait so I usually start doing some other tasks before testing the results. But I would like to be ...
-5
votes
2answers
65 views

Determine UNIX version without using uname command? [closed]

Is it possible to which flavor of UNIX a machine is running (AIX, HP-UX, etc.) without using uname command? If so, what other method/command is used to determine this?
-5
votes
1answer
29 views

How can i detect if the virtual CD ROM is attached or detached?

I have a requirement where i need to check if a virtual CD ROM is attached if yes then read the values and apply it on to the application. But couldn't find a way to detect if a CD ROM is attached or ...
0
votes
1answer
44 views

VPS restarted for no reason. Why?

I have a VPS that runs a Java server, a redis server and a PostgreSQL server. Everything is running well but last night my server "crashed" at 3:15:50 AM. At least that's what I thought. I looked at ...
0
votes
0answers
10 views

Signing PE files under Unix

After a signing PE file under Unix using osslsigncode, the file has digital signature but running it under Windows UAC shows that Publisher is unknown. Did anyone else have a similar problem? What is ...
13
votes
5answers
814 views

Copy file permissions, but not files in Unix

(From : http://stackoverflow.com/questions/15245144/copy-file-permissions-but-not-files, closed because off-topic) I have two copies of the same directory tree. They almost have the same files in ...
3
votes
1answer
71 views

How to import custom korn shell script into Nagios monitor

Our company is consolidating our monitoring solutions (WUG, Cacti, Zabbix) to Nagios. I have used Zabbix for years, and am trying to understand how to get Nagios to report on applications that I have ...
2
votes
1answer
251 views

Should I create ZFS zpools with whole disks or partitions?

I am making zpools on FreeBSD machine. While creating zpools i observe these two cases:- If i take raw disks and create zpool then i am able to form zpools and they are working perfectly. If i ...
45
votes
16answers
11k views

Favorite rsync tips and tricks

The more I use rsync the more I realise that it's a swiss army knife of file transfer. There are so many options. I recently found out that you can go --remove-source-files and it'll delete a file ...
0
votes
1answer
50 views

In /etc/hosts is there something special about the first hostname for any given line?

I know that the first one is said to be canonical, but I don't fully understand the practical implications. This question was triggered by the man page for hostname -f, specifically when it says: ...
0
votes
0answers
36 views

ls hangs on NAS mount point

Frequently we are running into this problem. our NAS mount points works perfectly and all of sudden it hangs. when we go and do ls hangs the terminal. strace ls /srv/git hangs here ...
3
votes
1answer
54 views

OpenLDAP advanced ACL configuration

I have a multiple DITs in my OpenLDAP server. I made user cn=config the root so that cn=config has root access to all DITs (each DIT). In addition, there is a per-DIT administrator IDed as ...
0
votes
1answer
40 views

Server ran out of HD room

A rogue script brought my centOS-based server to its knees and resulted in 0 bytes of HD room left. I since fixed the issue and everything seems to be running normally. So my question is, what ...
0
votes
9answers
405 views

What is the easiest way to find out in what file a word is contained?

I've got a number of .conf files in the following "lxadmin" directory and suspect that the text "tanguay.info" is in one of them somewhere. I do this command: cat /etc/httpd/conf/lxadmin/* | grep ...
2
votes
4answers
5k views

pam_ldap.so before pam_unix.so? Is it ever possible?

we have a couple of servers with PAM+LDAP. The configuration is standard (see http://arthurdejong.org/nss-pam-ldapd/setup or http://wiki.debian.org/LDAP/PAM). For example, /etc/pam.d/common-auth ...
25
votes
24answers
40k views

Finding the Public IP address in a shell script

I can find my IP address using ifconfig or hostname -i command. But how do I find my Public IP? (I have a static public IP but I want to find it out using unix command)
4
votes
1answer
92 views

cp -p will preserve times for some files but not all?

I have a source directory on a machine with a bunch of files, all with the same permissions, that I want to copy to another directory, that is mounted via SMB. [tmark@dexter JR09141045 ...
2
votes
3answers
1k views

sudo: no tty present and no askpass program specified

I am trying to add some file in a remote server by BigTuna (continuous integration tool), and it give me a error message. Any one have any idea how can I add that file to server? sudo: no tty ...
7
votes
1answer
1k views

using temporary files vs pipes advantages and disadvantages

Say I have a file named jobs.csv and I would like to get the top 50k jobs done by Foo I can either do: # cat jobs.csv | sort -u | head -n 50000 > /tmp/jobs.csv # cat /tmp/jobs.csv | while read ...