7
votes
1answer
1k views

Customizing bash shell: Bold/color the command

There are a number of tutorials/posts online (e.g. http://www.cyberciti.biz/faq/bash-shell-change-the-color-of-my-shell-prompt-under-linux-or-unix/) about how to customize your prompt in bash by ...
4
votes
3answers
158 views

How can I make a public variable in Linux that all users would see?

I need to have a variable $FOO on the system that contains a string all users could use, but I have no idea how to create one. The Upstart job is obviously not a solution as from this thread - Is it ...
4
votes
1answer
11k views

How do you get NOPASSWD sudo option to work in Fedora 15? [duplicate]

Possible Duplicate: How to run a specific program as root without a password prompt? I installed fedora 15. I use sudo visudo to modify sudoers file and add the following line: USERNAME ...
3
votes
1answer
654 views

'Cannot open display' on restored GNU screen session

Using debian unstable with Gnome 3 but I think this has always happened. If I log out and then log back in again it seems the X session is restarted or in some way changed. In any case, when I start ...
3
votes
1answer
3k views

How to run a specified codeblock with getopts when no options or arguments are supplied?

So I am writing a script that mixes options with arguments with options that don't. From research I have found that getopts is the best way to do this, and so far it has been simple to figure out and ...
2
votes
1answer
157 views

Need to find a cronjob

I have a problem, some user ,and I'm not sure who, on one of my servers wrote a cronjob that executes every night at midnight. The cronjob creates a sql dump of a database which is then grabbed by ...
91
votes
14answers
127k views

How can I resolve a hostname to an IP address in a Bash script?

What's the most concise way to resolve a hostname to an IP address in a Bash script? I'm using Arch Linux.
2
votes
4answers
1k views

SAMBA Share - Keep user from deleting a file

I'm creating a hidden "Access Log" .txt file of employees accessing a program I've created and need to know how to make it so this file cannot be deleted. Reason being, this program helps to automate ...
5
votes
3answers
5k views

Is it possible to export env variable via Upstart?

I need to export a variable FOO=stringhere so that system processes could use it. And the place I would like to do this, is Upstart job. Unfortunately, I tried as per Upstart manual to do env ...
4
votes
2answers
3k views

How do you protect a plain text credentials file with the username and password?

I am trying to setup an auto-mounting network drive. The network drive requires a user/pass. In the man page for "mount.cifs" there are two ways to provide the user/pass. [not recommended] put the ...
6
votes
1answer
1k views

Multiple installed versions of git - centos

I manually installed git 1.6 a year or two ago. I noticed today that the 1.7 version is available in yum, and installed it (package git-all) I now get the following output: [root@ovz5197 ~]# git ...
5
votes
4answers
1k views

Which stream does Bash write its prompt to?

I am trying to redirect all output from bash (prompt, user input, results) to a file Example: /bin/bash > file.txt 2>&1 I thought that would work, but I'm not getting the prompt. Can ...
6
votes
1answer
878 views

Automated incremental backups to an external drive

Background A client needs an automated backup solution to an external drive (to be taken offsite weekly). I'd typically suggest rsnapshot (or perhaps rolling out a custom rsync script), but this ...
2
votes
2answers
444 views

Detect bad USB cable

Is it possible to detect with confidence via command line that the USB cable is damaged? I tried to connect my printer and it's not printing with this cable, I guess that the culprit is the USB cable. ...
3
votes
1answer
396 views

Linux client that can communicate with NetMeeting

Are there any NetMeeting compatible softwares for Linux environments?
3
votes
1answer
5k views

How do you make a cross-process locking in Linux (C/C++)?

I need to make sure one process executes only in one instance at a time. On Windows you could use named mutex. But I have no idea what to use on Linux. I think I've seen an approach were app creates ...
4
votes
3answers
7k views

What is pageant for Linux? Saving SSH private key passwords

I want the computer like pageant, to show a SSH password prompt during boot time. I have my private keys stored in a Dropbox between 3 computers of which 1 is now Ubuntu. I have googled for 2 hours ...
5
votes
1answer
768 views

How to stop Bash appending history

I am having a lot of trouble setting up the terminal history of Bash the way I want. I would like to have no duplicate entries and if I enter a command I want it saved and the duplicates above ...
2
votes
2answers
748 views

Comparing files and their properties

I get information of a certain set of files in my mail every day, which looks like this: 58623208 Sep 14 20:08 blbn_blfbe_drv 57904920 Sep 14 19:54 blbn_cycmn 55814208 Sep 14 06:02 clsa_Upd 38912000 ...
9
votes
2answers
348 views

What does it mean that a distro is “based on” another distro?

Ubuntu is based on Debian. Mint is based on Ubuntu (except for Linux Mint Debian Edition, which is based on Debian.) When one distro is based on another, in what ways is it different from the parent ...
3
votes
1answer
1k views

Load my .profile for bash in Emacs terminal buffer? (multi-term mode)

I've got multi-term mode (derived from ansi-term) with bash started in Emacs 23.3, which is a terminal emulator running in Emacs. However, I noticed that it did not load my user profile, including ...
8
votes
3answers
18k views

ssh, start a specific shell, and run a command on the remote machine?

I am in a situation where several users are sharing the same user account on a remote machine. I have a "personal" directory where I wrote my own .zshrc file, and I would like to have a way to: ...
3
votes
1answer
838 views

Using syslog from a kernel module

I am writing a linux kernel module to report statistics and send some log messages. Can I use syslog to accomplish this job? Or is printk the only way?
9
votes
2answers
844 views

How can I tell if the pipe buffer is full?

I am piping output from one program into some Perl I wrote. This is a long running process , sometimes days, so I want to find out where my bottlenecks are and try to open them up. I want to know if ...
8
votes
2answers
2k views

Testing LS_COLORS in zsh

A few years ago I found an interesting code snippet that prints each type of file in its corresponding color according to the colors set up in LS_COLORS. Unfortunately, I can't remember the link ...
2
votes
1answer
246 views

Managing disk space on servers

Are there any open source tools to view (and possibly restrict) disk usage per user? I need to track disk usage on a server by user.
9
votes
1answer
6k views

Substitute text with sed and keep part of the original text

I am trying to convert <id>1</id> <Name>ENTERPRISE RESOURCE PLANNING</Name> to: <column name="id">1</column> <column name="Name">ENTERPRISE RESOURCE ...
2
votes
1answer
409 views

Can I use 2 WANs on DD-WRT?

I bought TL-WR1043ND and flashed it with DD-WRT. Now Im wondering if it's possible to use physical WAN port and wireless client WAN for internet usage and at the same time broadcast SSID for wired and ...
1
vote
1answer
410 views

Asking rsync to transfer files without connecting to the remote rsync server?

If I understand correctly, rsync tries to connect to a remote rsync server when transferring files via -e ssh. This worked well for me most of the time, but I am having problems rsyncing with a ...
4
votes
2answers
1k views

How to see who is logged on to many workstations?

Before I go to work creating my own I would like to find an existing system to do the following: Provide a concise list of users logged on to any of the workstations Show workstation host name, IP, ...
5
votes
2answers
783 views

Lock a byobu session with password?

I used to leave my byobu sessions detached on a server. I want to lock the session to prevent other users (root account) accessing my session. Is this possible?
1
vote
1answer
164 views

No installation option with livecd

I'm currently running Windows 7 x64 Professional and want to dual-boot with CentOS. I made a disk partitioning and wrote an image of CentOS on flash drive. But when it is being booted there's no ...
1
vote
1answer
525 views

Improved MySQL interface

Is there a MySQL terminal prompt that supports things like tab-completion and history? The standard one that comes with MySQL doesn't have those features
3
votes
2answers
453 views

Using `select` command to print menu in Linux

I am trying to implement a simple menu using select command. The script (for testing purposes) is as follows #!/bin/bash echo "*******************" PS3='Select an option and press Enter: ' ...
6
votes
1answer
4k views

ActiveX under Linux

Are there any solution besides a Virtual Machine to get ActiveX support under Linux? I mean are there any ways to use IE with wine to get ActiveX?? Or a plugin for Firefox that enables ActiveX?
4
votes
2answers
456 views

Knowing Privilege rights on a file in Linux

i wanted to know the Read / Write Access on to a file , so i did this way ls -l Denem.sh This command displayed -rwxr-xr-x 1 pavan employee 672 DEC 20 2000 pavan.sh Could anybody please tell ...
7
votes
3answers
670 views

why for loop doesn't raise “argument too long” error?

I found that this would raise the "argument too long" error: ls *.* And this would not raise it: for file in *.* do echo $file done Why?
0
votes
1answer
71 views

How do use the define_webjump in conkeror

I have started to use conkeror yesterday and so far I like it it has a good documentation apart from one wierd thing. I want to add duck duck go to my webjump options. I have found that I need to use ...
1
vote
2answers
1k views

Using grep to read a paragraph on Solaris

How can I grep a paragraph from a file in the Solaris operating system? I tried the -p option used in AIX, but it's not useful in Solaris. grep -p Accept is not working in Solaris. Is there any other ...
7
votes
1answer
473 views

Note-taking and outlining using Vi: On startup, highlight tags and display tags in a preview window [duplicate]

I am using vi as a note-taking and outlining tool and therefore I thought that this stackexchange site would be appropriate to ask this question. I am constructing the "tags" file by myself. What I ...
4
votes
1answer
388 views

On startup, highlight tags and display tags in a preview window

I am using vi as a note-taking and outlining tool. I am constructing the "tags" file by myself. What I would like to do is that when I open my notes or outline file, vi reads the tags present in this ...
32
votes
5answers
5k views

Why do hard links exist?

I know what hard links are, but why would I use them? What is the utility of a hard link?
4
votes
1answer
816 views

Behavior of mmap'd memory on memory pressure

I have a large tar file (60GB) containing image files. I'm using mmap() on this entire file to read in these images, which are accessed randomly. I'm using mmap() for the following reasons: Thread ...
0
votes
2answers
190 views

How to put Mysql path in bash profile on MacBook Pro 10.6.8

I want to put a mysql path into the bash profile of my macbook pro. How do I access the bash file and then make it visible in the finder so I can open it with a text editor and put in the path?
3
votes
1answer
2k views

eth0 is proxy-arping, but /proc/sys/net/ipv4/conf/eth0/proxy_arp is 0

I'm scratching my head about this question... I have a debian squeeze machine that is connected to an internal lab network. We have a lot of machines that have default proxy-arp configurations on ...
27
votes
4answers
12k views

Clone ownership and permissions from another file?

Is there a command or flag to clone the user/group ownership and permissions on a file from another file? To make the perms and ownership exactly "like" that of another file?
9
votes
2answers
1k views

Improve the font rendering in Fedora

I was using Ubuntu and recently moved to Fedora 15 with Gnome 3. I am not at all impressed with the subpixel smoothing and fonts in Fedora. How do I improve the readability and quality?
8
votes
4answers
2k views

How to prepend a license header recursively for all .h and .cpp files in a directory

I'm trying to add a license header to all header files and source files in a project directory using a for loop. This is not working, is there any other approach using sed?
3
votes
1answer
5k views

Can ping but can't do ssh

I am able to ping my friend but not able to do ssh. Why so? He is using a modem. I thought there might be some firewall enabled. I told him to type #iptables -F He did that, but still I am not able ...
0
votes
0answers
128 views

Restore overwritten /usr/local/bin [duplicate]

Possible Duplicate: Recovering deleted files on fedora I accidentally overwrote my /usr/local/bin directory when installing something. Is there a way I can restore this directory? What can ...

15 30 50 per page