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
2answers
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?
7
votes
2answers
16k views

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

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 ...
6
votes
1answer
113 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
386 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
15k 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 ...
0
votes
0answers
15 views

Is duplicity a reliable backup tool? [on hold]

Well, the question might seem very generic, however, I don't have any specific question about it. Can anyone here who has used duplicity for a few years for backup up production servers talk about ...
2
votes
1answer
24 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 ...
0
votes
0answers
9 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
158 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
56 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
25 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
39 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
801 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
56 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
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 ...
2
votes
1answer
232 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
48 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
21 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
49 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
38 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 ...
24
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)
-1
votes
0answers
78 views

Server hacked; how? [duplicate]

It looks as if our CentOS LAMP server has been compromised today. It appears malicious files have been uploaded into the webroot and requests are being made to upload these files to other servers. I ...
4
votes
1answer
79 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 ...
6
votes
4answers
2k views

Automatically-reconnecting TCP tunnel

I have an unreliable network connection between two machines: sometimes active TCP connections get dropped for reasons beyond my control. I want to establish a reliable TCP connection between the two ...
4
votes
2answers
223 views

How to trigger cross-platform jobs between Windows and Unix

I have an application which has components on Windows and Unix. I need to run overnight jobs which initiate tasks/jobs on both environment. These need to be sequenced so I cannot simple use Cron / ...
1
vote
0answers
24 views

How do I configure nginx to have a server block pointing towards a django app?

Suppose I have an nginx server, with Django apps set up as "/djangoapps/exampleapp1/" and "/djangoapps/exampleapp2/". Suppose I just registered a domain "www.exampleapp2.com". How can I point ...
2
votes
4answers
3k views

imuxsock messages in syslog and system becomes unresponsive

I am getting such messages in syslog. rsyslogd-2177: imuxsock lost 21869 messages from pid 3418 due to rate-limiting rsyslogd-2177: imuxsock begins to drop messages from pid 3427 due to rate-limiting ...
76
votes
9answers
107k views

How do I get current Unix time in milliseconds using bash?

How do I get the current Unix time in milliseconds (i.e number of milliseconds since Unix epoch January 1 1970)?
6
votes
3answers
6k views

How can I rename an unix user?

I have a user named hedgehog and I want him to be named squirrel, but I don't want to change his numeric user ID. How can I accomplish this?
1
vote
1answer
31 views

How to strip TCP headers from tcpdump (with hexadecimal output of non-printable data)

tcpdump don't know how to strip TCP headers from packed data. tcpflow print's only packet data, nice, but it supports only ASCII characters, no hexadecimal output possible. Did I overlooked some ...
4
votes
2answers
2k views

Is “sudo su -” considered a bad practice?

Background I know the difference between su -, sudo su -, and sudo <command>: su - - switches user to root, requires the root password sudo su - - switches user to root, requires only the ...
4
votes
5answers
11k views

Timeout ssh sessions after inactivity?

PCI-DSS 3.0 requirement 8.1.8 states: "If a session has been idle for more than 15 minutes, require the user to re-authenticate to re-activate the terminal or session." Same was in PCI-DSS 2.0 ...
-3
votes
3answers
837 views

How to query specific DHCP server

is there a way how to query a specific DHCP server for an IP address? Something similar to dig @_IP_ADDRESS_ _server_name dig @8.8.8.8 apple.com Thanks
1
vote
1answer
3k views

How do you handle log rolling (or truncation) for unix services that don't handle it themselves?

In my particular case it's the mysql general log and slow query log; neither is critical to operations, just there for troubleshooting if need be, and mysql doesn't have a mechanism for rolling or ...
2
votes
3answers
131 views

Best practices recovering from a failed UNIX package upgrade?

When upgrading or installing a package through a package manager like Aptitude, what do you do to ensure everything works afterwards? If the package manager would break something after running, do ...
2
votes
2answers
177 views

HFS theory: What else is there to a system other than a root filesystem?

I'm grokking the HFS linux standard documentation, and I can't move beyond this concept. The concept I don't get can be demonstrated by the following quote: The contents of the root filesystem ...
1
vote
1answer
804 views

Which filename encoding should I use to be compatible with Windows, Mac and Linux

I'm using a Linux server as fileshare. These files are accessed by Windows computers with a Samba server, accessed by Macs with a netatalk server (afpd) and also trough ssh an sftp for Windows, Macs ...
0
votes
7answers
999 views

vi syntax to comment out non-commented lines (cron)

Anyone know if it's possible in vi to replace only uncommented/non-blank lines with comments? If I want to replace a commented line with something I know I can use :%s/^#/##foo##/g -- but I am ...
35
votes
5answers
40k views

When does /tmp get cleared?

I'm taking to putting various files in /tmp, and I wondered what the rules on deleting them are? I'm imagining it's different for different distributions, and I'm particularly interested in Ubuntu ...
0
votes
1answer
79 views

Can you use LDAP and PAM to implement a restricted shell?

Can you use LDAP and PAM to implement a restricted shell and control those users via groups on the LDAP DC? I would like to do this for several Red Hat, Solaris and Ubuntu servers? Thanks!
0
votes
2answers
7k views

How to determine when a user's account will be locked in HP-UX

I'm trying to figure out how to determine when user accounts on an HP-UX server will be locked. I would need this for every user on the server. On other kinds of UNIX, this kind of this is typically ...