Hot answers tagged

7

Note although the system call is called truncate, it actually is better interpreted as saying "Make my file report this many bytes in size". As per the system call manpage: The truncate() and ftruncate() functions cause the regular file named by path or referenced by fd to be truncated to a size of precisely length bytes. If the file previously was ...


4

The link is to /dev/sda1. you can establish that with the file command: in my system, for instance, # file * ff28e743-4409-41b3-99ea-f133cdcc86be: symbolic link to `../../sda1' Thus, your option b is right. /dev/sda is not a link, hence it does not point to anything else at all: it is just a special (device) file, see for instance this Wikipedia ...


4

I looked into this a bit once. Maybe avoid a term like "mail server" 'cos once you start using a term like MTA you are now using a very specific terminology - nomenclature even, and "mail server" is perhaps just too general, ambiguous even, to be meaningful. From what I can gather, it goes like this MUA-->MSA--->MTA--->(MDA->Comp)<--MUA ...


3

The throttling control is managed by the cpuspeed daemon on RedHat 6.5 You can stop the daemon: service cpuspeed stop This is not true that servers are only throttling when they are overheating, Cpu scaling change the cpu frequency by the server's workload, by default to minimum while the cpu is idle and to maximum when the there is a heavy workload. ...


3

Device naming is performed as the devices are initialised by the kernel - so no, naming is not persistent. Commonly UUIDs are used to identify disks, as /dev/sdX is subject to change. One can use udev to recognise disks by their serial number (or some other attribute) and create a symlink in /dev , for example /dev/mydisk1. There are a number of ways that ...


3

The problem has been solved. There is small link at the lower left corner "Full disk summary and boot loader...". So click on this link, and you will probably see your disk drive and green mark, this means that bootloader will be installed, just uncheck this option and click continue, warning message will appear, but just ignore it. Now you can install RH ...


3

IMHO this tiny tutorial, MUAs, MTAs, and MDAs, is very good at explaining the basic concepts of the Unix email system. Yes, properly configured sendmail should be able to send email to any MTA on reachable hosts (but that MTA may refuse the mail for various reasons) Now when you say mail server that typically refers to an alternate path on either/both of: ...


2

This can't be done in ~/.ssh/config because SendEnv cannot be overridden. Using aliases won't work for scripts that call ssh. One alternative is to export a function. E.g. in ~/.bashrc: function ssh() { LANG="en_US.UTF-8" \ LC_ADDRESS="$LANG" \ LC_IDENTIFICATION="$LANG" \ LC_MEASUREMENT="$LANG" \ LC_MONETARY="$LANG" \ ...


2

The vncviewer running on A talks (via the vnc protocol) to a vncserver (acting as an X server) or directly to the X server (with the vnc extension) running on B. So really all the X protocol happens exclusively on B (even if they are displayed via vnc on A), so the xhost and DISPLAY ops (specific to the X protocol) done inside the terminals displayed in ...


2

Summarizing the comments leading to success to an answer... Some linux distributions (including centos) by default disable direct X access (for which the server would be listening to port 6000 + display num) by running the X server with the -nolisten option. Details here: What is the "-nolisten tcp" parameter for X If direct X access is desired ...


2

The term "email server" is vague. E-mail has a lot of moving parts to it. Sendmail is a Mail Transfer/Transport Agent (MTA), a.k.a SMTP server. (There are others, e.g. exim4) Something will open a session with a domain's SMTP server to send a message to another host on that domain. (The domain's SMTP server is found via DNS MX records) Once an SMTP ...


2

Click on Player -> Removable Devices -> CD/DVD -> Settings, Browse for the 2nd disk, click Ok, then proceed with the installation in the player.


2

Amazon provides a library for all of these type of functions, so that they can be performed at the EC2 level, without resorting to bad ideas within the virtual machine itself. You can use ec2-reboot-instances instance_id to request EC2 to reboot any instance, including itself. An instance can fetch its own ID using either: curl -s ...


1

Your version of gnome-terminal might be too old to handle the Emoji. Someone reported an issue with Lynx which I found was actually a problem with the older versions of gnome-terminal.


1

It seems that the RPM database is corrupted in some way, so you should try to restore it: sudo rm -f /var/lib/rpm/__db* and then rebuild it: sudo rpm --rebuilddb Hope this helps!!


1

Try detox. From the manual page: Name detox - clean up filenames Synopsis detox [-hnLrv] [-s -sequence] [-f -configfile] [--dry-run] [--special] file ... Description The detox utility renames files to make them easier to work with. It removes spaces and other such annoyances. It'll also translate or cleanup Latin-1 (ISO ...


1

Install both rpm's at the same time. rpm -ivh git-*.rpm perl-Git-*.rpm


1

It is possible to create user without (with impropoer) home dir. however if you are to connect to the host, you must have a valid home dir. What you show implies home dir field is not, or improperly set in /etc/passwd, you home dir is not created. grep you id using id this is a int like 1001 or 501, let's use 1001. now grep it in /etc/passwd ...


1

In Ubuntu, which I understand you have available, in the directory /etc/udev/rules.d, there is a README file which states: package-supplied rules ... can be found in /lib/udev/rules.d ... So, now # ls -lhd /lib/udev/rules.d/*disk* -rw-r--r-- 1 root root 8,0K giu 10 18:58 /lib/udev/rules.d/80-udisks2.rules -rw-r--r-- 1 root root 10K mar 10 2014 ...


1

I want to recover all my commands which are cleared history -c will clear ~/.bash_history in that shell. bash does not immediately flush history to the ~/.bash_history. ~/.bash_history is not overwritten until you write the file using history -w. If you really want to clear the history you need to use history -cw in all open shells. If you have not ...


1

Drives are organized into clusters. Each cluster is some multiple of a hard drive sector (512 bytes). Initially, a directory is one cluster size big (e.g. 4,096 bytes). Even if there's just one file in the directory, the directory will show up as 4,096 bytes. Larger directories, containing many files, might be 8,192 bytes, 16,384 bytes, etc. Linux, like ...


1

It's normal. All the system files – both the rpm database and the directories into which your .rpm would install stuff – are only modifiable by root. Who owns the .rpm file is not important.


1

Basically you'll have to port vte.sh to tcsh. What it does is: before each prompt, it prints a certain escape sequence that contains the directory, in URI-encoded form. The escape sequence is the so-called OSC 7, e.g. \e]7;file:///home/username\a. It seems tcsh does have a precmd (and even a cwdcmd) feature so it can be done, but unfortunately I'm not ...


1

You will need to specify a boot image and a boot catalog for mkisofs to make the disk bootable. These files are often called isolinux.bin and boot.cat respectively, and you should specify them to mkisofs via the -b and -c flags: mkisofs -b isolinux.bin -c boot.cat -no-emul-boot -o genertatedIso.iso /MyRep


1

Here an example: mkisofs -r -R -J -T -v -no-emul-boot -boot-load-size 4 -boot-info-table -V 'my-rhel6.4' -p 'RHEL6.4' -A 'RHEL6.4' -b isolinux/isolinux.bin -c isolinux/boot.cat -o /var/tmp/my-rhel6.4.iso /path-of-your-distro


1

The reboot , halt and shutdown commands usually require root for security reasons [1]. Writing on google how to run sudo in a script it answers with Add your script to the /etc/sudoers file with the NOPASSWD attribute, so that it is permitted to run without prompting for a password. You can tie this down to a specific user (or set of users), or allow it ...


1

I experienced the same problem. It seems rpmforge's packages that git needs are broken. I had to temporarily disable that yum repo in order to download git correctly. yum-config-manager --disable rpmforge Then try to install git using... yum install git You may need to install another yum repo to substitute rpmforge, however I did not need to.


1

Use the Required-Start header field. Assuming the init script for DB2 is called db2server, add this line to the header section of the second script: # Required-Start: db2server Here's the LSB documentation you're looking for. If you look at other scripts, you'll see a header section with these fields: ### BEGIN INIT INFO # Provides: # Required-Start: ...


1

For those looking for a straight answer, R belongs to RHEL Extra Packages for Enterprise Linux (EPEL), therefore: su -c 'rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm' sudo yum update sudo yum install R


1

I think installing R on CentOS 7 is simplest this way: sudo yum install -y epel-release sudo yum update -y sudo yum install -y R



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