Tagged Questions
3
votes
4answers
140 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
1answer
36 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
33 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
144 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
125 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
331 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
187 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
98 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
358 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
172 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
214 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 ...
5
votes
4answers
659 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 ...
0
votes
4answers
157 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
132 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
183 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
534 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 ...
3
votes
4answers
2k 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
430 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
2k 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 ...
3
votes
3answers
4k 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
454 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 ...