5
votes
2answers
2k views

RHEL6 LUKS with TPM support?

I'm surprised that this question is not asked more frequently, but (in RHEL) does LUKS support TPM's the way that Windows BitLocker does? If so, how is this feature implemented, and does it provide ...
2
votes
1answer
3k views

How to set a new password from bash?

I'm using busybox with a limited passwd (I don't have --stdin option) and without chpasswd and I need to change the password of an user from bash. Here is my best result: echo newpassword > ...
3
votes
3answers
405 views

Install pdflatex via SSH on Amazon EC2 instance

I need to install pdflatex on my Linux powered machine (Amazon EC2 instance, didn't decided yet which distribution would be the best so also feel free to give a hint) because I want to connect ...
0
votes
1answer
593 views

apache ldap authentication taking far too long

I configured apache2.2 (CentOS 5.6) to provide ldap authentication with Active Directory. <Directory "/var/www/html"> AuthType Basic AuthName "Authenticate with domain ...
2
votes
1answer
65 views

GIT push only commits older than x months

Is there a way to specify push commits that are older than x months to remote y ? Like setting up a branch that automatically tracks master-(x months) and then push it to a separate remote?
32
votes
2answers
9k views

Prepending a timestamp to each line of output from a command

I wish to prepend a timestamp to each line of output from a command. For example: foo bar baz would become [2011-12-13 12:20:38] foo [2011-12-13 12:21:32] bar [2011-12-13 12:22:20] baz ...where ...
1
vote
2answers
920 views

autocomplete filenames using compgen

As part of a larger autocomplete function I'm writing, I want to use compgen to generate a list of files. I read the bash manual entries for compgen and complete, and from there I assumed that the ...
5
votes
4answers
10k views

Print odd-numbered lines, print even-numbered lines

I want to print the odd-numbered and even-numbered lines from files. I found this shell script which makes use of echo. #!/bin/bash # Write a shell script that, given a file name as the argument ...
1
vote
0answers
219 views

Flash drive not working on a particular RHEL machine

I have a 32 Gib flash drive. The first time I copied files to it, it failed with a write error and the drive was no longer recognized by the server. I ran a scan on it using Windows chkdsk, which ...
0
votes
1answer
182 views

GRUB splashimage

I am using leagcy GRUB (0.97) on a system running linux kernel 2.6.31. I am using a GRUB splash image from /boot/grub/menu.lst. I see that the splashimage goes away once the GRUB menu selection is ...
20
votes
3answers
26k views

How can I communicate with a Unix domain socket via the shell on Debian Squeeze?

I’m running a Debian Squeeze web server. I’ve installed memcached on it, and configured memcached to listen on a Unix domain socket (at /tmp/memcached.sock), as it only needs to receive messages from ...
6
votes
1answer
494 views

What are the main differences between Unix and Linux kernels today?

I know that many of the same programs run flawlessly on top of both kernels. I know that historically, the two kernels came from different origins. I know philosophically too that they stood for ...
21
votes
4answers
2k views

What's the difference between these two dd commands?

What's the difference between two dd commands that have different bs and count values, as long as they multiply to the same? For example: dd if=/dev/random of=aa bs=1G count=2 dd if=/dev/random ...
1
vote
1answer
7k views

How to change TFTP root Directory

How can I change root Directory of TFTP in RHEL 6 ? Default Location is /var/lib/tftpboot
2
votes
2answers
2k views

Passing values through pipes

I don't quite understand pipes in Linux command line. I noticed that: ll - R | grep *.pdf will list files ending with .pdf But locate *.pdf | du -h will not calculate the size of files ...
14
votes
2answers
24k views

Refresh env variables after editing bashrc file

I frequently edited the .bashrc file to export new environment variables. Rather than close the console and start a new one to refresh the env variables, is there a convenient way to refresh?
1
vote
1answer
832 views

BSD Books - Best books for OpenBSD and FreeBSD [closed]

I will begin a thorough study of the OpenBSD and FreeBSD, which are the most complete books? I found these, which are the best? Openbsd books Freebsd books
3
votes
5answers
3k views

Difference between 'man ls' and 'ls --help'?

I use both man and --help in Bash programming to get help. For example, to get information about usage of ls command, I may use man ls Or ls --help Both give some what similar output. What is ...
2
votes
1answer
840 views

FreeBSD CPU frequency scaling on AMD Sempron 2100

I have FreeBSD 9.0-RC3 installed on an HP Thin Client that has a Mobile AMD Sempron(tm) Processor 2100+. I am trying to get cpufreq and powerd to manage the frequency of the processor, but I'm not ...
3
votes
2answers
294 views

Grub and boot loader

What effect does setting a partition to active still have with common boot loaders. For instance if you install grub on the mbr, do you still need to specify the /boot as active, or does grub just ...
2
votes
1answer
852 views

How to move window in GNU Screen

I have a window called 'Codes' in window 1, and I want to move it to window 7, is it possible?
16
votes
4answers
33k views

How to split window vertically in GNU Screen?

I saw some body split their window to 2x2, I just want to know how to do that? I know the 'split' command in Screen can only split the window horizontally.
4
votes
3answers
1k views

Linux distribution with 'yum' package manager

I hope that this question is appropriate for this site (if not, please accept my apologies). I am a professional statistician who uses the statistical programming language R. I'm currently building ...
5
votes
1answer
2k views

Will process ids be recycled? What if you reach the maximal id?

Process IDs are strictly increasing, but if your system runs long enough and there is a lot of processes terminating and starting, you could at some point reach the limit of the underlying integral ...
41
votes
5answers
18k views

How to check if a shell is login/interactive/batch

I think I understand the differences between an interactive, a login and a batch shell. See the following links for more help: What is the difference between a 'Login' and an 'Interactive' bash ...
20
votes
2answers
50k views

How can I change a user's default group in Linux?

Being new to Linux administration, I'm a little confused about the following commands: useradd usermod groupadd groupmod I've just finished reading the user administration book in the Linux/Unix ...
9
votes
3answers
9k views

How can I track who SSH'es into my linux machine?

I'm running Ubuntu 10.04. Is there a way I can get a daily report of who has logged onto the box, what time, and even - this may be asking too much - a report of the commands they used? This is a ...
21
votes
3answers
47k views

Can I change root's email address or forward it to an external address?

I'm getting a lot of mail in my root user's mail account. This appears to be mostly reports and errors from things like cron scripts. I'm trying to work though and solve these things, possibly even ...
7
votes
2answers
1k views

What is word splitting? Why is it important in shell programming?

I'm getting confused about the role word splitting plays in zsh. I have not been exposed to this concept when programming in C, Python or MATLAB, and this has triggered my interest of why word ...
3
votes
1answer
720 views

How can I network these two computers using eth1394/firewire-net, automagically?

I have two partly-dead laptops. The first will not run X, and the second has some sort of problem with the monitor. I am not interested in repairing either of them, but since they both have firewire ...
13
votes
5answers
3k views

How can I paste (overwriting) with vim?

In vim I use yy and p all the time to yank and paste lines. However, if I want to replace one line multiple places in the file, I can't use yy p dd p because the dd deletes the line to the clipboard ...
1
vote
1answer
357 views

How to invoke root privileges from my custom app?

In a GUI-environment, I want to be able to ask the user for the root/sudo password and then execute an app that requires root privileges from within my app. As an example, say I want to run an editor ...
24
votes
9answers
9k views

Why use `chmod 644` instead of `chmod u=rw,go=r,…`?

I've been working on *nix for a few years now, and one of the things I just can't get used to is octal permissions in code. Is there some other reason than line length to prefer chmod 644 ... over ...
5
votes
6answers
7k views

Can I use `apt-get` to upgrade to the latest version of Nagios?

At the time of this writing the latest version of Nagios is 3.3.1. I am running Ubuntu 10.04 and have used apt-get update; apt-get install nagios3 to end up with version 3.2.0. I know there are a lot ...
2
votes
5answers
2k views

full access to remote computer without remote static IP

How can I access to remote computer that the remote computer is in a local network? I worked with reverse ssh : http://www.vdomck.org/2005/11/reversing-ssh-connection.html I don't want just SSH but I ...
2
votes
2answers
1k views

How to make new KVM with existing hard drive

I've been looking through the options of the QEMU binary, and I can't work this one out: Is it possible to make a new KVM machine with an existing hard drive image with an OS (XP Pro in this case) ...
1
vote
2answers
2k views

How to install software in solaris?

How do I install NetBackUp software in solaris? I'm learning the software and I need to install and practice using it.
1
vote
1answer
489 views

Ubuntu 11.10 SFTP chroot jail problem

I am creating a SFTP server with Chroot Jail. The problem is user cannot log into the home directory. I need to keep ChrootDirectory value to one directory above the user's home directory ...
7
votes
1answer
4k views

Why doesn't my iptables rule work?

I have two interfaces on my VPS: eth0 and eth0:0. I want to block incoming packets on port 80 on eth0:0 using iptables. I tried this, but it doesn't work: iptables -A INPUT -i "eth0:0" -p tcp ...
2
votes
4answers
1k views

Can separate unix accounts share a username but have separate passwords?

On unix systems, each separate user account has a unique username. Passwords, then, are not unique - every distinct user could have the same exact password. I want to do the converse. I want one ...
2
votes
2answers
382 views

Tab spacing in VIM

I want to change tab key spacing to 4 spaces in VIM editor on CVS server. I know the :set tabstop=4 command is used for that but it does not have a permanent effect. After restarting VIM it changes ...
6
votes
2answers
4k views

How to run a C program as a daemon?

I have a C program which I want to run as a daemon. How do I install it so it will run as a daemon on CentOS? Someone said to use @reboot, and some said to put it in /etc/rc.d/rc.local. Which is the ...
2
votes
1answer
3k views

Patching a file (in this case dwm) and failed hunks

I'm trying to add the transparency patch to dwm. I downloaded the .diff file and in my dwm directory ran this: max@linux-vwzy:~/misc/dwm/dwm-5.9> patch < dwm-transparency.diff patching file ...
4
votes
2answers
2k views

Set alignment of numeric columns when columnating data

I use column -t to format data for easy viewing in the shell, but there seems to be no option to specify column alignment (e.g. align to the right). Any Bash one-liners to do it? I have arbitrary ...
4
votes
2answers
937 views

Salvaging a “broken” hard drive

My girlfriend's macbook's hard drive failed, so I gave her a new one and reinstalled OSX on it. Works fine. However, I wanted to see if I could use her old hard drive for backups/fun. I was able to ...
13
votes
1answer
8k views

How do I set a user's default .bashrc file?

On Ubuntu 10.4 I have edited the /etc/bash.bashrc file to set some variables like the command history size (HISTSIZE=5000), however if I create a new users Ubuntu by default gives them a .bashrc file ...
2
votes
1answer
486 views

How can I regenerate the default '/etc/' config files?

I've removed nagios3 with apt-get remove nagios3 and then removed the files in by using the command sudo rm -R /etc/nagios* Now when I run apt-get install nagios3 the config files (/etc/nagios3/*) ...
12
votes
4answers
22k views

How to read from two input files using while loop

I wanted to know if there is any way of reading from two input files in a nested while loop one line at a time. For example, lets say I have two files FileA and FileB. FileA: [jaypal:~/Temp] cat ...
21
votes
1answer
28k views

How can I increase the number of inodes in an ext4 filesystem?

I had a problem (new to me) last week. I have a ext4 (Fedora 15) filesystem. The application that runs on the server suddenly stopped. I couldn't find the problem at first look. df showed 50% ...
1
vote
2answers
292 views

How can I match this text in awk, printing line numbers for matches?

I have a text file thousands (roughly 148,000 lines long) that consists of a lot of sequences like this: b 29. b 52. c 84. c 83. c 94. c 93. c 61. b 38. c 81. c 92. c 28. c 37. c 27. ... and since ...

15 30 50 per page