Tag Info

Hot answers tagged

17

If your system has busybox installed, you can use this to put things back. busybox is a binary with lots of standard utilities built into it. Things such as mv, sh, ls, etc. From your comment on Pavel's answer, it sounds like everything ended up in /var. You can try doing /var/bin/busybox mv /var/{bin,etc,lib32,lib64,root,sbin,usr} /. That should get most ...


10

mv folder/* ./* is wrong as well. You should be more careful about the semantics of the commands you run. The mv command with more than two arguments just takes all argument except the last one and moves the paths they point to into the directory specified in the last argument. To move all directories (except hidden ones) from folder to the current ...


3

You could switch to single user mode as SHW suggested and then back again. But for CentOS server you should do it this way: init 1; init 3 Since the first command will disable your network, you should pass the second one on the same line. Otherwise you will not be able to connect to your server using SSH.


3

A problem that I often encountered when cloning from a physical to a virtual machine is that the initrd is often not appropriate anymore. You should boot your VM on another OS, using a livecd or whatever, then : mount your centos root partition to /mnt, and other partitions to appropriate subdirectory bind mount /dev, /sys and /proc to /mnt/dev, /mnt/sys ...


3

Executing a background job Appending an ampersand ( & ) to the command runs the job in the background. For example, when you execute a find command that might take a lot time to execute, you can put it in the background as shown below. Following example finds all the files under root file system that changed within the last 24 hours. find / -ctime -1 ...


3

According to Fedora Wiki, Fedora 8 is unsupported since 2009. Most packages are outdated, for example Bash, in Fedora 8 it's 3.2 and in modern distros, it's 4.2. Full list of packages in Fedora 8 is located here. And is it safe? Well, it depends on software running on your servers. I can suppose that devs had eliminated a large number of bugs in for example ...


3

Both SSDs are already fully committed to your three RAID-1 partitions. You don't have any free space on either of them. Edit: yes, that is what I am saying. The df output shows you that /dev/md[12] are mounted (I'm guessing /dev/md0 is swap; /cat /proc/swaps will confirm that). cat /proc/mdstat then tells you that /dev/mdN is a RAID-1 made up of ...


3

The grep command is designed to show only matching lines of a given files. With the use of -C option it is possible to show not only the matching line(s) but some lines before and after it. So to have the 3 lines before and after the line you want: $ grep -C 3 "26/Mar/2014:16:35:13 +0000" access.log You can also tune more precisely the number of lines ...


3

Confirming a service On CentOS 6 I would investigate if the httpd service is accessible. $ service --status-all |& grep httpd httpd is stopped You can disable this service using chkconfig: $ chkconfig --list | grep httpd httpd 0:off 1:off 2:off 3:on 4:on 5:on 6:off $ sudo chkconfig httpd off $ chkconfig --list | grep httpd ...


2

According to the vgdisplay output, you have over 900gb of unallocated space (Free PE value). Since your root volume is not an LVM volume, and /opt currently resides on /, you cannot increase the available space. What you can do however is to create a new filesystem for /opt. The process would go something like this: # create a new 5gb logical volume ...


2

Looks like you need to install X. Your VNC server log says file not found for xsetroot, xterm, and twm. See here: http://wiki.centos.org/FAQ/General#head-f9b66646092bdc0de1d8b4c82b427f796adfe2f8


2

You have already provided the specific answer, but if you are looking for other executables or files to see what package they are installed with, utilize yum whatprovides *relative/path/to/file*, for example: $ yum whatprovides '*bin/dig' 32:bind-utils-9.8.2-0.17.rc1.el6_4.6.x86_64 : Utilities for querying DNS name servers Repo : base Matched from: ...


2

upstart, the service manager, can restart httpd if it is set to respawn. apachectl stop stop's the process without notifying upstart Try: service httpd stop By the way, when you issue any of the stop like commands to apache it will stop accepting new connections. The gracefuls will additionally allow it to complete any currently open connections.


2

This is normal unix behavior, however you can make cifs ignore remote user information. mount -t cifs -o \ user=blarg,password=blarg,nounix,uid=0,gid=0 \ //10.151.170.170/events /var/blarg/copy-to This makes all files look like they are owned by root:root. All files created will be owned by the user who mounted it; in this case, blarg. nounix ...


2

Pravin offers some good general points, but doesn't really elaborate on any of them and doesn't address your likely actual problems. First, you need to find out how postfix is receiving those messages and why it's choosing to relay them (the two questions are very likely related). The best way to do it is by looking at the message ID of any one of the ...


2

edit This package is not available in the basic repo. but in the forge repo. Though I still think it's a very good package edit You could just install a devel package like openssl-devel or glibc-devel those package only include header and will not hurt I would install htop it's a simple binary that enhanced the top command experience by 1000 it's less ...


2

As per man mount.cifs: uid=arg sets the uid that will own all files or directories on the mounted filesystem when the server does not provide ownership information. It may be specified as either a username or a numeric uid. When not specified, the default is uid 0. The mount.cifs helper must be at version 1.10 or higher ...


1

In order for public key authentication to work, the SSH daemon needs to be sure that the key in the authorized_keys file can't be tampered with by anyone other than the owner (and root, of course). This means that the write permissions of the user's ~/.ssh directory, and all directories leading up to it from / must be restricted so that only the owner (and ...


1

Can I do that? Can I open an application on a different display than mine? Yes, if you have the appropriate permissions. For example, on a desktop where you are the only current user with a GUI, try switching to a console (e.g., via alt-ctl-F4), log in as the same user, and try: xterm -display 0:0 Your mileage may vary with regard to the display id ...


1

IMPORTANT If you're here, and have ran mv incorrectly, can't run shell commands, and folders missing from root directory (/), first of all, if you have SU, DO NOT exit SU until fixed, because you won't get it back. If you are remotely connected, if you disconnect, you will not be able to ssh, leave server alone, don't reboot - most running services should be ...


1

It is possible that some third-party software could check for the existence/contents of that file and do something variable based on the result. So, for example, if something is designed to run only on RHEL and not CentOS, checking that file would be a simple (and FWIW, easy to bypass) way to enforce that. I would be surprised if there is a good reason for ...


1

The application binary is called gpk-application. It comes in the gnome-packagekit package: # yum install gnome-packagekit gnome-packagekit-extra You apparently need to run it as non-privileged user. It does not seem to create menu entries in KDE so: $ gpk-application & The forum post where I got this info claims that it's bundled in the "Graphical ...


1

I was able to achieve this using Dovecot's specification for Post-Login scripting. http://wiki2.dovecot.org/PostLoginScripting After once a shell script is run, environmental variables can be used to obtain the user name and IP address. This information is detailed in the link above.


1

Both CentOS and Fedora make use of GNOME for their desktop environments. To open multiple tabs you can use Ctrl+T to add additional tabs.     If you're attempting to have Nautilus open these tabs pre-populated with specific directories this, to my knowledge, is not possible. You'll have to resort to a scripted method such as this one from ...


1

This looks like you're using VirtualBox VM with a NAT network (it seems to give the address 10.0.2.15 by default). If so, you need to set up a port forward to access port 22 on the VM from the host. Open Settings->Network for the VM Click the little blue arrow next to the Advanced box Click the box at the bottom labelled "Port Forwarding" Click the green ...


1

Depends on how you configured your network interfaces. I would check in /etc/sysconfig/network-scripts/ifcfg-eth0 on the new VM and see if you can just change the value for IPADDR if it's present. If you have NetworkManager running and the interface is configured with NM_CONTROLLED=yes then the change will be applied when you save the file, otherwise you'll ...


1

Try doing the following instead. Install Desktop Packages $ sudo yum -y groupinstall "Desktop" "Desktop Platform" \ "X Window System" "Fonts" optional GUI packages $ sudo yum -y groupinstall "Graphical Administration Tools" $ sudo yum -y groupinstall "Internet Browser" $ sudo yum -y groupinstall "General Purpose Desktop" $ sudo yum -y ...


1

This sounds like VMware is capturing focus on you and doesn't really have anything to do with CentOS. You could try installing the VMwareTools which should allow for normal transitioning of your mouse and keyboard as the VM gains and loses focus. VMware has a knowledgebase article titled: Installing VMware Tools in a Linux virtual machine using a Compiler ...


1

Ensure that you have the package libgnomeui-2.0 mentionned into the error message correctly installed. Depending of your distribution, use apt-get or yum to install it. You may also need to install gtk+-2.0 and glib-2.0 (install first package and check the updated error message if any).


1

I had been struggling with the same problem on Centos6.4 x86_64. I got the following error : Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=6&arch=x86_64&repo=os error was 14: PYCURL ERROR 6 - "Couldn't resolve host 'mirrorlist.centos.org'" Error: Cannot find a valid baseurl for repo: base So, I fixed it by these steps: ...



Only top voted, non community-wiki answers of a minimum length are eligible