Questions specifically about Linux but not specific to a particular distribution. If the question could apply to any Unix-like system, specify your Linux distribution in the body of your question but do not use the /linux tag.

learn more… | top users | synonyms

2
votes
4answers
2k views

How to view only special content of a log file?

Is there an easy way to truncate a big log file? Or in other words: How to view only special contents of a log file. E.g. How can I extract the last 1000 lines from a log file? How can I extract ...
0
votes
0answers
58 views

How can I log who creates a directory? [duplicate]

Possible Duplicate: Is it possible to find out what program or script created a given file? Is it possible to log which process/user/IP created a directory? I only found out that the ...
2
votes
2answers
2k views

Directory/files owned by a non-existent user

A user has created a directory with files, but the user does not exist in /etc/passwd or /etc/group. The system is a Fedora server with an FTP server and proxy which redirects to a CentOS server with ...
3
votes
1answer
3k views

Xrandr not saving setting

Hello xrandr at install doesnt detect my tv to be 1920x1080@60hz, so I have to add the setting manually and when I do that with xrandr it works this is the commands I used xrandr --addmode HDMI-0 ...
12
votes
1answer
2k views

Fix Fn-keys for keyboard illumination

I've tried following the Ubuntu hotkeys/media keys troubleshooting guide and /usr/share/doc/udev/README.keymap.txt.gz to make the Fn keys work. After copying the map file and modifying ...
3
votes
4answers
2k views

Detach a daemon using sudo?

I noticed that sudo continues to run after executing any of the following lines. Is there any way to detach the daemon completely so sudo does not continue running? sudo -u user daemon & sudo -u ...
2
votes
3answers
342 views

What is the recommended filesystem to use when reaching sizes of 50TB?

My initial google searches say XFS or ReiserFS, but what does the community have to say about this? What are your experiences with 50TB sizes and up? Edit: After inquiring on IRC I think I would ...
1
vote
2answers
378 views

Yum stopped working after upgrading it

I just did yum upgrade yum and now I can't use it. It keeps showin this error: [root@devlon5 www]# yum install pdftohtml epel/primary_db 100% |=========================| 3.8 MB 00:00 ...
0
votes
6answers
10k views

Script to check for read only filesystem

How can I check a bunch of systems to find any filesystem that are mounted read-only? Possibly via a script?
1
vote
1answer
870 views

cURL on Linux not compiled, although installed

cURL is not compiled into PHP. I'm running: [root@vps ~]# cat /etc/issue CentOS release 5.7 (Final) Kernel \r on an \m Then I execute yum install curl and yum install php-curl. Then: [root@vps ...
1
vote
1answer
883 views

What are appropriate execution permissions for ~/bin?

I am putting some scripts in ~/bin and am wondering what appropriate file permissions are. To extend my question somewhat, what permissions make sense for */bin folders all over my system, and why?
2
votes
0answers
178 views

How do I install dvd-slideshow on Centos 5?

How do I install dvd-slideshow on Centos 5? http://dvd-slideshow.sourceforge.net/wiki/Main_Page I tried but only found a gui to install on Ubuntu. I'm using Centos 5, command line.
0
votes
2answers
607 views

Need to install MySQL Client libaries but RPM not installing them

I'm trying install the MySQL Client libraries for the Perl Mod of the same name but when I run sudo rpm --install -v --allfiles MySQL-client-5.5.16-1.linux2.6.i386.rpm and querying the rpm ...
8
votes
2answers
2k views

minimal TCP MSS in Linux

The TCP MSS in Linux must be at least 88 (include/net/tcp.h): /* Minimal accepted MSS. It is (60+60+8) - (20+20). */ #define TCP_MIN_MSS 88U My question is: where did they come up with ...
4
votes
4answers
551 views

why new pid is smaller than the old ones?

Is there any chance the new process's pid is smaller than the existed ones ? I have a daemon process which will restart when be killed, I recorded the pids, and found that the pid first came smaller, ...
11
votes
1answer
6k views

Using Linux cgroups to balance CPU performance

I have two dual-core Linux systems installed using Linux cgroups with relatively recent kernels; one is running Debian Squeeze, the other Ubuntu 11.04 Natty Narwhal. I've gotten CPU load balancing ...
0
votes
2answers
681 views

How do I set different directories for different domains on CentOS 5.5 server?

I'm running a CentOs 5.5 server and wanted to know what commands I needed to run to be able to do the following; I have 3 domains on the server - example1.com, example2.com, example3.com I wanted ...
4
votes
2answers
2k views

make a linux “from scratch” using package manager?

Is there an easy way yet to make a linux system "from scratch" using a package manager like pacman, dpkg, etc.? For example, something with which you can just say you want a working computer system ...
2
votes
3answers
3k views

Linux Kernel 3.x new versioning scheme

As almost everybody knows, Linux moved from the 2.6.x version to the brand new 3.x version. I've seen around many comments also about the fact that the versioning number for the kernel was changed ...
5
votes
2answers
1k views

What is the need of the struct thread_info in locating struct task_struct?

While reading through the Linux Device Drivers, I could understand that the Process Descriptor (of type struct task_struct) has all the info regarding a particular task. The process descriptors are ...
4
votes
2answers
934 views

Replace a substring of filenames in a directory

There exists a directory, which includes several levels of sub-directories. Under these directories, there are a set of files whose names include a common word, e.g, .cc. How can I replace the .cc ...
2
votes
1answer
2k views

How to install synergy on RHEL5?

I'm trying to build from source using CMake as recommended (http://synergy-foss.org/pm/projects/synergy/wiki/Compiling) [d3p299@we16410 synergy-1.3.7-Source]$ ./hm.py build Running setup... Error: ...
0
votes
3answers
465 views

Why Samba needs the VFS module?

I came across this picture when learning samba. I am confused with the VFS module in this image. Why we need this VFS module in samba server instead of passing directly the intend system call to ...
1
vote
2answers
2k views

Is it possible to kill another user's program? How?

root can kill any program run by any user. Is it possible for a user to kill another user's program without using sudo, etc.? Example: How can make user foo kill program x which is run by user bar?
17
votes
5answers
29k views

Linux ls to show only filename date and size

How can I use ls in linux to get a listing of filenames date and size only. I don't need to see the other info such as owner or permission. Is this possible?
2
votes
1answer
119 views

ifconfig shows an IP out of the lan range

I have set router IP to 192.168.112.20 and starting IP address to 192.168.112.25. But when I run ifconfig command it shows the following IPs: inet addr: 192.168.174.12 Bcast 192.168.174.255 ...
5
votes
2answers
3k views

How can I downgrade a glibc version?

I upgraded glibc for a reason that isn't around anymore so I want to downgrade it. The stupid thing is a lot of programs rely on glibc at the moment. I still have the 2.4 version on the system as the ...
4
votes
2answers
730 views

Determine time of last suspend(-to-ram)

I have a backup script that is run each night. If my (Linux-) host is suspended it is woken up by another host before the script runs. I would like to be able to suspend my host again after the ...
5
votes
5answers
3k views

Piping PS output into a Text file

So what im wanting to do is pretty basic.....but im not sure how to go about it. Lets say I have a program running, but I want to pipe the output of ps -C "ProgramXX" into a file. Normally Running ps ...
1
vote
1answer
511 views

Finding duplicate files

I need to write a bash script that finds duplicate files, but in addition to md5sum it needs to use cmp to do the final check. I tried the command below in my shell. How can I add a loop and put it ...
6
votes
4answers
302 views

How to send stderr to stdout with a pipe to another command?

I'm trying to capture all of the output of a build operation, and send it to myprogram. I seem to only be able to capture part of it. This is what I'm trying: make clean && make ...
3
votes
2answers
2k views

How can I test whether a block device is read-only from /sys or /proc?

On a CentOS6 system I have /dev/block/sr0 (read only) and /dev/block/sda (read/write). How can I find out programmatically which devices are read-only? There is a ro file in there, but it's '0' for ...
1
vote
2answers
890 views

How to keep overwriting the contents of a file instead of appending to it

How do I clear the contents of a file before writing to it? For example: echo one > filename.tmp # filename.tmp now contains "one" echo two > filename.tmp # filename.tmp should now contain ...
2
votes
1answer
854 views

Randomly logging out

My Xubuntu 10.04 system logs me out seemingly at random. How can I diagnose why this is happening and correct it?
0
votes
1answer
2k views

How to do “netcat” relays properly so that I have more control?

How to use the netcat to have relays? Like following I tried but not working: cd /tmp mknod backpipe p nc -l -p 7007 0<backpipe | nc 192.168.1.101 9001 | tee backpipe I want to receive data on ...
8
votes
10answers
7k views

linux diff tools: create list of modified files

How do I create a list of modified files programmatically using linux command line tools? I'm not interested in the difference in any particular file (delta, patch). I just want to have a list of new ...
6
votes
1answer
2k views

Custom kernel: fails to load firmware when module built-in

I'd like to have all my modules built-in, but this fails with iwlagn: iwlagn 0000:03:00.0: request for firmware file 'iwlwifi-6000-4.ucode' failed. iwlagn 0000:03:00.0: no suitable firmware found! ...
1
vote
1answer
343 views

Problem after ati driver installation

I've just installed the ati radeon drivers using the latest version on the ati site. Upon rebooting this has caused gnome 3 to fall back into a safe mode. My question boils down to how do I fix this ...
1
vote
2answers
2k views

How to exit login screen and start commandline while at login screen

I am at the gnome 2 login screen but I want to exit and re-enter command-line environment. I remember there was a combination hot key one has to invoke.
2
votes
2answers
360 views

perl regex replacing globally when global not selected

I'm using Ubuntu 11.04 and wrote a small script that searches within text files for certain "tokens" and replaces with some a prewritten snippet from a template file of the same name. The text files ...
2
votes
1answer
277 views

NFS Shared Folders - Is it transitive?

If I have Computer-A, and share a folder to be accessed by Computer-B, can I take that same shared folder and share it with Computer-C? Computer-B has two itnerface cards, eth0, and eth1. eth0 is ...
10
votes
3answers
4k views

How can I determine the fs type of my current working directory?

I need a platform-independent and lightweight way of detecting the mount type of my CWD. Specifically, I need to determine if my CWD is in an SSHFS, NFS, CIFS, SMB, or local block store mount. I need ...
2
votes
2answers
2k views

lsof for a specific process?

There's a bzip2 process running in the background and I have no idea where it came from. It's eating up a lot of resources. Can I do a reverse lsof to see which files are being accessed by this ...
1
vote
2answers
134 views

Use Linux to backup a MSWindows network?

Is it possible to use a Linux machine to backup everything on a Windows network? I would like to backup MS databases and also drives, so if a database record needs restoring, it can be done easily, ...
0
votes
2answers
2k views

Grub MD5 Crypt algorithm

How does Grub's MD5 algorithm work? When you run grub-md5-crypt and enter the same password each time you get different results. Generally md5 is supposed to always return the same hash, so why does ...
14
votes
4answers
30k views

How to check password with Linux?

I want to check, from the linux command line, if a given cleartext password is the same of a crypted password on a /etc/shadow (I need this to authenticate web users. I'm running an embedded linux.) ...
8
votes
3answers
1k views

How can I exclude files by default with rsync?

How can I exclude files by default with rsync? Here is how my normal rsync syntax starts out: rsync --exclude ".ht*" --exclude "error_log" --exclude ".DS*" --exclude "old" ... I've seen a lot of ...
9
votes
2answers
3k views

How to restrict internet access for a particular user on the lan using iptables in Linux

Let's say there are two users on the LAN, A and B. How do I restrict user A from internet access using iptables rules and saving the rules so that after reboot, they are still effective. And suppose I ...
3
votes
4answers
247 views

Internet SSH Server Security Considerations

What steps should I take to reasonably secure my linux desktop before opening sshd to the Internet so I can connect from anywhere?
1
vote
1answer
358 views

BluRay Burner High I/O Wait State with UDF; Optimization Possible?

I've recently scaled back my home network, with one of the bigger changes being a switch-over to using a BD-RE drive for backup. With years of pictures and home video consuming about 25GB, and ...