0
votes
2answers
115 views

Yum update problems on CentOS 6.5 minimal as VMware guest

INFO: I am using Windows 7 Pro (64bit) with VMware Workstation version 10.0.1 . I am using CentOS(64bit) 6.5 minimal, for the first time. I am running this from my workplace network, which may use a ...
5
votes
3answers
154 views

Apache server starts automatically after stopping the service

What can cause httpd to start automatically after stopping it? In a bash script I need to first stop apache web server. This is the script: apachectl stop; while pgrep httpd; do sleep 1; done echo ...
2
votes
0answers
36 views

gnome “switch user” shortcut or command line

Is it possible to switch user of gnome desktop environment by single command or any shortcut key, in centos 6.0, or Can we create shortcut key? I found "fusa", but still unable to install it.
1
vote
1answer
74 views

syslog-ng won't write to log file - “No such file or directory”

I have set up a fresh instance of syslog-ng using the conf file included below. I can see that messages are trying to route to the right place (var/log/bash) when I look in val/log/messages. But I ...
2
votes
1answer
43 views

Why does AWK not like dots in one of two substitutions?

I'm trying to use AWK in a bash script to look for a placeholder string in a template file and replace it with the contents of a variable that (can) contain various special characters. Example: ...
0
votes
1answer
44 views

Rebuilding RPM results in “invalid numeric value”

I am attempting to add some config changes to Bash and repackage it as an RPM in CentOS x86. This is not something I've done before, so I'm at the mercy of info I've found around the internet. I am ...
4
votes
5answers
4k views

Why does find -mtime +1 only return files older than 2 days?

CentOS 5.9 I'm struggling to wrap my mind around why the find interprets file modification times the way it does. Specifically, I don't understand why the -mtime +1 doesn't show files less than 48 ...
2
votes
2answers
100 views

How to use -d in ntfsundelete?

As far as I can tell from the manpage of ntfsundelete getting a file back is done with e.g. ntfsundelete /dev/sdb3 -u -m important.txt which would undelete the file in-place. If I don't want ...
1
vote
0answers
48 views

Where is the default icon used by Gnome when no icons are found?

Just to experiment, I moved the folder /user/share/icons/ away, as in saved it on a USB drive and deleted it from Linux. Now, all icons are shown as the default "white" icon. Where is this icon ...
1
vote
2answers
745 views

Use inotifywait to move file when it loads in dropbox folder

I'm trying to find a way to immediately move a file to another folder as soon as it appears in my dropbox on CentOS. I have scoured the internet for some clues but I can't get any further than the ...
-2
votes
3answers
182 views

run file from different directory [closed]

I have a directory mainfolder with a subdirectory execution which contains a configure script. I can switch to the execution directory and run ./configure and it works fine. Now I'm trying to figure ...
3
votes
3answers
2k views

Fix “firefox is already running” issue in Linux

I am trying to open Firefox in CentOS, but I'm getting the following message: Firefox is already running but is not responding and Firefox doesn't open. I tried this in command line: kill ...
3
votes
4answers
467 views

How can I uncompress gz files in random directories and store the decompressed files in those same directories?

CentOS 5.9 I've got a server with a foo.ext.gz file located in a variety of random directories. Example: /opt/fooapp/foosubdirectory/foo_randomnumber/blah/blah/foo.ext.gz ...
0
votes
1answer
160 views

When running a terminal, I get the default bash prompt

Whenever I run a terminal in Linux (Centos), my console line starts with: bash-4.1$ During the Centos installation, I created a user 'mark'. Later on that day, I needed to change the name to 'john' ...
2
votes
3answers
475 views

Colorize Bash Console Color

I need to be able to set my CentOS 6.4 bash prompt color to yellow. I've managed to find where to set this (.bashrc) and the ANSI color for yellow (\e[0;33m). I've setup my prompt as follows: ...
4
votes
3answers
197 views

What process is running before I even get a prompt?

When I log in to a specific server I see the following: Note that I get get Last login: ... information but no prompt. I hit Ctrl+C and only then do I get my prompt, thus proving that my username ...
1
vote
3answers
252 views

Best tool for monitoring server usage

I was just wondering what the best tools for retracing logs and what logs I should be checking to work out what's going wrong with a server, or what the client has executed to get the server into it's ...
6
votes
4answers
968 views

What's the difference between a hard links and copied files?

RHEL 6 My understanding is that hard links include a copy of the original file and that I could delete a hard-linked file in one directory, and it would still exist in the other directory. If ...
1
vote
4answers
183 views

Why would someone want to change the last access date of a file without making actual changes within the file itself?

CentOS 6 I'm studying RHEL / Centos and recently learned that the touch command can be used to change the last access date of a file. I'm struggling to understand a practical reason why anyone would ...
27
votes
7answers
1k views

What's the equivalent to && when writing a bash script?

I apologize in advance if this is a duplicate question. I did make an effort to search/check before asking here. I'm comfortable with writing one-liners like this: foocommand && ...
0
votes
1answer
144 views

Bash config files being read in contradiction to `man bash`

While trying to determine the differences between .bashrc and .bash_profile I notice that .bashrc is never read, and that .bash_profile is only read from SSH, but not from PHP. This seems to ...
2
votes
1answer
371 views

How to have find recurse into subdirectories when using -prune option

I see that the find command does not descend into subdirectories when you're using the -prune option. How do I tell find to recurse into the sub directories, but also ignore some stuff? ...
0
votes
1answer
671 views

How to change terminal character encoding

Today I uninstalled the GUI packages on my home CentOS installation. Now, when the machine starts, I get the login prompt. It acts finicky. Sometimes pressing enter just once after answering each ...
4
votes
5answers
3k views

CentOS | [root@hostname] does not show anymore?

For some reason I logged into my CentOS6 server and at the beginning of every line it normally shows [root@hostname]# Now it shows -bash-4.1# What does this mean? And how to I get it back to ...
3
votes
1answer
575 views

Can I refresh my shell within a shell script?

Very new to Bash scripting... I am trying to setup a script that starts with a minimal CentOS 6 install and provisions it for Ruby development. #!/bin/bash # Add PostgreSQL Repo rpm -i ...
2
votes
2answers
3k views

Where is the system profile that gets sourced at login on CentOS 5.8?

In CentOS release 5.8 (Final), where is the bash system profile? Is it /etc/profile ? I've added the following to source my ~/.bashrc file but haven't had any luck as it fails. I know it fails ...
5
votes
4answers
5k views

What are the different ways that a message can be displayed to a bash shell after a user logs in?

I have a CentOS 5.7 VPS using bash as its shell that displays a branded greeting immediately after logging in via SSH. I've been trying to modify it, but can't seem to find where it is in the usual ...
9
votes
1answer
550 views

How do you omit “./” when running scripts on current directory

On some tutorials over the internet they can run a script on the current directory without doing: ./script How do you omit this? I am using CentOS 5.6 x64. I want to run it this way script
1
vote
2answers
2k views

How do I correct a directory incorrectly copied into itself?

Given the following situation... <path>/mydir1/mydir2 ...where mydir2 should have overwritten mydir1, but was instead placed inside, and both directories actually have the same filename. How ...