124
votes
4answers
21k views

/usr/bin vs /usr/local/bin on Linux

Why are there so many places to put a binary in Linux? There are atleast these five: /bin/ /sbin/ /usr/bin/ /usr/local/bin/ /usr/local/sbin/ And on my office box, I do not have write permissions ...
14
votes
2answers
1k views

gnu find and masking the {} for some shells - which?

The man page for gnu find states: -exec command ; [...] The string `{}' is replaced by the current file name being processed everywhere it occurs in the arguments to the command, ...
9
votes
5answers
8k views

Why are PATH variables different when running via sudo and su?

On my fedora VM, when running with my user account I have /usr/local/bin in my path: [justin@justin-fedora12 ~]$ env | grep PATH ...
5
votes
2answers
1k views

How to tweak Linux to run reliably on flash memory?

Since flash memory only has a limited number of writes, what tweaks are necessary for installing a Linux system onto flash media so that the OS can run reliably for a long period of time? Some ...
2
votes
1answer
221 views

Printing conjunct unicode characters using single keystroke

I want to print a conjunct unicode characters (which do not have dedicated unicode value assigned to it, but which can be print using the combination of unicode characters) using a single key stroke ...
0
votes
2answers
144 views

Where to handle packets between clients?

"Server": 192.168.1.1 I want to "theoretically" disable that the clients can "ping" each other. Can i use an iptables rule for it? e.g.: iptables -A FORWARD -m iprange --src-range ...
2
votes
1answer
228 views

tripwire report - inode number

Hi I am investigating tripwire and have stumbled upon something which i am unsure about. in a tripwire report generated after i modified hosts.deny to include an extra # I noticed the inode number ...
5
votes
5answers
858 views

debian security /etc permissions

I'm setting up a debian box with shared webhhosts. These users don't have ssh permissions, just ftp. The users are allowed to use PHP and I setup suphp for that so the php processes runs under their ...
3
votes
2answers
578 views

How to test file system correction done by fsck

How to make sure that fsck is correcting corruptions while keeping the integrity of file system? Suppose clients are writing lots of files through NFS to server, and there happens something that ...
1
vote
1answer
1k views

IPTABLES rule for separating users

I have an OpenWrt 10.03 router [ IP: 192.168.1.1 ], and it has a DHCP server pool: 192.168.1.0/24 - clients are using it through wireless/wired connection. Ok! Here's the catch: I need to separate ...
0
votes
4answers
2k views

Installing mplayer in Linux

I don't know if this is the right forum to ask, I have started to use Linux (OpenSUSE). I need to install mplayer on it. I unpacked the mplayer archive. Then in the command screen I navigated to the ...
1
vote
1answer
968 views

removing startup item from com.apple.launchd

Im not sure if this is the right place for this kind of question, but here it goes anyways... I installed a program a few months ago, it had a startup option that I did install. Later, I decided to ...
2
votes
1answer
4k views

How do I add a new user to an embedded Linux system by hand?

I have a system which was designed for use by root only and I want to run an FTP server on it. The software I use handles authentication by using same username and password as OS itself. To me it ...
7
votes
2answers
2k views

How can I cut a large file in place?

I have a very big text file, about 80GB, and I need to cut a part form it that lies between two given lines. The part I need is not big, and I have not enough space left on the hard drive to do things ...
5
votes
2answers
3k views

Script that keep reading a stream

Sometimes I cat a stream like /dev/input/event0. I want to write a script that does something every time there is more output. The definition of more output might be every time it reads a byte. ...
2
votes
1answer
136 views

how to use secured port using ssh

We have a process that is using a working secured port using this scp command like so: /usr/bin/scp -P 1234 -i /path/key_rsa /home/path/filename.txt user@remotehost:/tmp I'm working on a schell ...
3
votes
4answers
7k views

programmatically creating a remote directory using ssh

Using a shell script, how can I create a directory remotely from serverA -> serverB using ssh? Can I pass the create directory command with the ssh command? How? I'm basically looking to create a ...
23
votes
5answers
16k views

How can I play a sound when script execution is ready?

I am executing every now and then some python scripts which take quite long to execute. I execute them like this: $ time python MyScript.py How can I play a sound as soon as the execution of the ...
1
vote
1answer
1k views

Installing individual packages from Solaris .iso

I need to update the following packages: SUNWjaf SUNWjato SUNWjmail I read that the updated versions of these packages can be found on the latest version of Solaris, and that it's possible to just ...
1
vote
2answers
8k views

Getting PHP to work with apache to run .php files through browser

I have VPS running Debian 5.0 (I think) and I would like to get it to run PHP files. I was told it needed to be configured with Apache. I tried entering the command apt-get install apache2 php5 ...
4
votes
4answers
288 views

Recommend a Linux Distribution for my use

I have no experience with Linux. I'm looking for a distribution which is beginner friendly. Ubuntu looks great. My usage for this system will include web development, and possibly application ...
8
votes
1answer
2k views

What's the difference between “export” and “setenv”?

What's the difference between export and setenv?
4
votes
2answers
322 views

Relaunch application once finished

Is there a command that relaunch the application once it finishes from the command line? Letting you do something like: > relaunch python myapp.py If not, then what's my best option? I know I ...
12
votes
5answers
25k views

Using the system date / time in a Cron Script

I'm setting up a Cronjob that will backup a MySQL database I have in my server, but I don't want it to keep overwriting the same file over and over again. Instead, I want to have an array of backups ...
6
votes
4answers
645 views

What client for DECwindows?

I have inherited a VAX system that was just migrated onto CHARON-VAX (VMS emulated on Windows) I can access it via ssh, but not with X. Anyone here familiar with DECwindows? is it X compliant? Or do I ...
86
votes
7answers
12k views

Which is the safest way to get root privileges: sudo, su or login?

I would like to have the root account in safety even if my unprivileged user is compromised. On Ubuntu you can only use sudo for "security reasons" by default. However I am not sure it is any safer ...
18
votes
3answers
2k views

Is it secure to leave a root shell running in detached screen session?

I'm curious about the security of leaving a root shell running inside a detached screen session. I typically never do this. Aside from the potential of my non-root user account being compromised ...
0
votes
1answer
235 views

Apache and Tomcat integration

I am trying to integrate apache and tomcat. I thus want apache to forward requests to tomcat. I am using the mod_jk module for apache to achieve this. So far I am trying to get tomcat to auto-gen the ...
4
votes
2answers
628 views

How can I see dumps of wholе HTTP packets?

I need to see whole HTTP packets sent and recieved by an application for debugging purposes. How can this be done in command-line?
2
votes
1answer
430 views

Removing the [ OK ] From start_udev

Under /sbin/start_udev, how can I remove the [ OK ] so it's not printed? I'm trying to change /etc/rc.sysinit to display the information I like, and I have managed to remove all the info output ...
2
votes
1answer
952 views

How can I add a line to multiple files in a directory tree structure?

Adding a line to multiple files in the same structure is not very hard, but I am stumped on how to do it over a possibly large directory tree structure. So lets say we have your project directory, ...
2
votes
2answers
2k views

Root password not working to log in to Gnome with gdm

I have a weird issue going on. I have a user account and I can login to Gnome normally. From a terminal there I can use su root and switch to root with my root password. However, when I try to login ...
8
votes
2answers
1k views

Parsing XML's , JSON's and newer data file formats in UNIX using command line utilities

Unix environment has some excellent tools for parsing text in various forms. However off late the data is not in the regular set of formats(CSV,TSV,Record based or some other delimiter based) it used ...
4
votes
2answers
814 views

rm -rf failing if deleting in parallel

rm -rf will fail if something tries to delete the same file tree (I think because rm enumerates the files first, then deletes). A simple test: # Terminal 1 for i in `seq 1 1000`; do mkdir -p ...
1
vote
1answer
370 views

Wireless in Debian Squeeze

I am trying to get wireless working a lenovo g560. I tried following the instructions on the debian site here http://wiki.debian.org/wl but it is not working. At step 7 I get an error that modprobe ...
1
vote
1answer
719 views

apache symlinks and dokuwiki

I am running a dokuwiki on an apache webserver. Usually I put media files into the directory /var/lib/dokuwiki/data/media. However, to be more flexible and to save disk space, it would be nice to use ...
6
votes
1answer
626 views

Assistance wanted in removing the “No mail.” notification in MOTD for Ubuntu 10.10

How do I remove the No mail. notification on Ubuntu 10.10 Server? This occurs when I log in, and is located underneath the message of the day I have a separate script which uses a different messaging ...
9
votes
1answer
4k views

Unable to handle kernel paging request?

[Disclaimer: I was initially a little nervous about posting this here, so I asked on Meta if discussing homebrew / modding was acceptable. Based on the response I've gotten from several veteran ...
2
votes
1answer
1k views

All my superblocks are corrupt!

I am having a problem with my ubuntu ext3 filesystem. I can't boot from it or mount the volume when running live CD. When I try e2fsck I get: "Bad magic number in super-block while trying to open ...
8
votes
2answers
4k views

Forcing sudo to prompt for a password

If I do the following: sudo su - //enter password exit exit //login again straight away sudo su - The second invocation of sudo does not request a password because even though I have logged out ...
2
votes
2answers
875 views

How do I prevent expansion when I use a pattern as argument to a script?

I need a very simple script which does this: mogrify -resize $1x$2^ -gravity center -crop $1x$2+0+0 $3 so that I can call it in this way: cropresize.sh 110 110 *.png the problem is that the ...
4
votes
4answers
874 views

How to get the network status (online/offline) and attribute it to a variable in shell script?

How to get the network status (online/offline) and attribute it to a variable in shell script?
16
votes
6answers
15k views

How to get my own IP address and save it to a variable in a shell script?

How can I get my own IP address and save it to a variable in a shell script?
4
votes
2answers
5k views

Converting text into ASCII/ISO-8859-1

I'm looking for some tool that can convert text, ideally from UTF-8 (but ISO-8859-2 and WINDOWS-1250 would be fine) into ASCII/ISO-8859-1? I have seen some online transliteration tools but I need ...
3
votes
1answer
284 views

Sharing Linux Printer to windows

I want to share the printer connected to Linux with Windows machine, so that windows-user can print to this Linux printer. How can I do this ? P.S. I followed the ...
7
votes
1answer
2k views

mdadm Raid5 gives spares missing events

I succesfully builded up a raid5 array on debian testing (Wheezy). As the manpages and further tell, the array would be created as an out of sync array with just a new spare injected to be repaired. ...
12
votes
4answers
4k views

Is it possible to find the path of a running program?

I have a xmms2d process running, but two possible executable files (in different directories, both in the executable path) that could have spawned it. I suspect that one of those is corrupted, because ...
3
votes
2answers
636 views

How is the octal 2-byte output calculated from od

I'm struggling to work out what the octal 2-byte output from the od command is. I understand the octal output (-b flag) but the octal 2-byte is a mystery to me (-o) Can someone shed some light on how ...
1
vote
0answers
109 views

How do I determine the make & model of my storage devices? [duplicate]

Possible Duplicate: How do I find out what hard disks are in the system? I'm running a CentOS 5.5 system. This system has 4 disks and a 3ware RAID controller. How can I determine the make ...
1
vote
2answers
1k views

exim4 on debian: why does this ACL work when testing with -bh but not in actual use?

I've got local_acl_check_data to reject the typical spammer tactic of using the same address as From: and To:, but since some less-spammy sources, such as Yahoo Groups, do this, I'm using a whitelist ...

15 30 50 per page