Tag Info

New answers tagged

0

As people have already stated, you can find a skeleton of bashrc in /etc/skel/.bashrc. If different users want different bash configurations then you must put a .bashrc file in that users home folder. When it comes to .bash_profile and .bash_login, the user needs to create those manually and link them via bashrc. bash_profile and bash_login exist to create ...


0

man logrotate This mechanism provides compress and delayedcomress for your purposes


0

While chaos's answer is good to be used in interactive shells, this one can be used as a POSIX script, for example if you need to do this periodically and/or do it on another computers. #!/bin/sh while test $((i+=1)) -lt 366 ; do for j in 00 06 12 18 ; do file="GLDAS_NOAH025SUBP_3H.A2003$(printf '%03d' "$i").${j}00.001.2015210044609.pss.grb" ...


0

You can simply mount to ISO file to a loopback device and edit the files. Since you are only changing a firmware file you would not need to rebuild the ISO after the change. mount -o loop -t iso9660 filename.iso /mnt/iso You only need to rebuild the ISO if you change something in the boot record.


0

Red Hat's own Kickstart is a popular approach for automating RHEL installs/upgrades. It can be used to perform the OS install/upgrade itself and then to perform post-install/upgrade actions such as hardening and installing further packages.


0

With a few rare exceptions you can use Ctrl-C instead.


0

I got an official reply to the bug I opened: https://bugzilla.redhat.com/show_bug.cgi?id=1246992 Unfortunately, the reply is that setting different alpm policies for different devices is not supported. It may be supported in the future for devices on different controllers, but not as a specific setting for different drives.


1

First, install doxygen (I'm sure your OS distribution has a package). Then, in the top directory of your source tree run: doxywizard Doxyfile This gives you an easy way to create a Doxyfile, which is essentially a set of instructions about how you would like doxygen to proceed. I like to configure it to output to a subdirectory like doc/html. Then put ...


1

Don't allow USB access. Truth is that if someone has physical access to the machine, there's not a lot you can do. In this narrow case your best bet is to disable booting to USB and lock the BIOS (or whatever EFI setup utility is being used) with a password. It's a bit like putting a pad lock on a garage door, there are ways around it, but it's an easy ...


1

There is really only one answer to this: full disk encryption. The way full disk encryption is usually done with Linux, your /boot partition is not encrypted and contains the kernel and initramfs — just enough functionality to start a minimal environment that prompts you for the passphrase to decrypt the root filesystem and get access to everything else. ...


1

The file listing of /etc/mtab appears to belong to /etc/alternatives! Is there any way you could have accidentally renamed /etc/alternatives to /etc/mtab? Is /etc/alternatives missing? If so, then the fix is just to rename /etc/mtab back to /etc/alternatives. If not, then you are stuck with the problem of merging the contents of the real /etc/alternatives ...


4

A variation on @chaos solution (bash 4.0 or above or zsh 4.3.11 and above): for a in GL.....2003{001..365}.{00..18..6}00.001.2015210044609.pss.grb do [[ -f $a ]] || echo "$a" done or for a in {001..365}.{00..18..6} do [[ -f "GL.....2003${a}00.001.2015210044609.pss.grb" ]] || echo "$a" done to print only the missing day+hour


9

With zsh or bash4, you can use brace expansion for that: ls -d GLDAS_NOAH025SUBP_3H.A2003{001..006}.{0000,0600,1200,1800}.001.2015210044609.pss.grb >/dev/null Notice the brackets: {001..006} means expand to 001, 002, ... 006 {0000,0600,1200,1800} to every one of the above add 0000, 0600, 1200 and 1800. >/dev/null is to avoid the standard output of ...


2

Build the file names in a loop and then test for non-existence of a file: for day in `seq -f "%03g" 1 30` do for hour in 0000 0600 1200 1800 do filename="GLDAS_NOAH025SUBP_3H.A2003${day}.${hour}.001.2015210044609.pss.grb" if [[ ! -e $filename ]] then echo "File missing: $filename" fi done done Note: I do not guarantee this ...


4

To disable the writing of access times, you need to mount the filesystem(s) in question with the noatime option. To mount an already mounted filesystem with the noatime option, do the following: mount /home -o remount,noatime To make the change permanent, update your /etc/fstab and add noatime to the options field. For example. Before: ...


1

It turned out to be a lack of /* in the %files section %files %defattr(-,root,root,-) /*


0

Perhaps I'm not quite grasping what your definition of "consolidated documentation" is, but you could try, in Google's search, typing the following: vrrp site:keepalived.org The link to the UserGuide is here: KeepAliveD UserGuide


1

I do not remember doing anything that day that may have generated these files, nor did I download them as I don't even know what these files are or why they're there. You can have a look at history, maybe there is a clue and you remember what could have caused this. Since these files look a lot like they are part of your system, you can try to locate ...


0

$ ip netns identify $PID where $PID is the process I.D. of the process, which you can get in various ways. http://man7.org/linux/man-pages/man8/ip-netns.8.html


3

Without line breaks, grep is buffering all of the input, so that it can show you the "line" where the string appears. Two questions: Do you need the adjacent content? are there spaces or other characters separating the tokens? If you don't need the context of the adjacent content and there are spaces separating tokens, just use tr to turn spaces into ...


1

The URL you referenced is the official documentation. If it's incomplete or not helping, you'll need to talk tot he maintainers of that site to address those issues, but that is the offical, blessed, sanctified, formal, certified, everything-else-ified documentation.


0

Since you asked for the year, ls -lac is an easy one to remember if, like me, you use ls -la all the time. The c gives you ctime which will display a year if it's not the current year or the hour and minute if it is.


2

You should define what exactly booting means to you. If you want to delay the moment the kernel is starting to run, you'll need to configure the boot loader. I guess (but I am not sure) that GRUB is flexible enough to be configurable for that purpose. If you want to delay the moment the Linux system is starting to initialize some server (including a login ...


0

Here is my report on the deeper dives into the booting process on the BananaPro/Pi. First thing you'll need is a RS232 serial TTL UART converter to interface with the onboard UART. Afterwards you can open that serial device to investigate the booting procedure (Be careful and leave the VCC pin of your TTL-UART converter unattached to the board. If your ...


0

You can try any of the following set alias typeset -f or if you are using Bash 4 look at the builtin compgen


1

In your ispconfig.vhost file, see this block: <FilesMatch "\.ph(p3?|tml)$"> SetHandler None </FilesMatch> It tells to not associate any handler for php files. A little after, you have another block: <IfModule mod_fcgid.c> ... <FilesMatch "\.php$"> SetHandler fcgid-script </FilesMatch> ... </IfModule> This ...


1

As your df output suggests, your drive is actually 15 GB in size, out of which 5.5 GB (38%) are used and 9.2 GB are free space. So the installation is fine. You can also see in your fdisk -l output that the end sector matches the final sector (off by one - nothing strange) and the start is at the beginning (minus the head sectors). However the problem ...


0

Instead of using sudo to grant the possibility to use unshare, you could use the setuid bit, because the unshare program is designed to work with it. It says in the man page: The unshare command drops potential privileges before executing the target program. This allows to setuid unshare. So after executing sudo chmod u+s /usr/bin/unshare, running ...


2

From what I can see, the Marvel; 88se9230 is supported in newer kernels (since 2013 and kernel 3.2 at least). See this bug report and these messages to the linux-ide mailing list. Based on the above, it should be supported by most recent distributions.


0

You can use this little systemtap script : #!/usr/bin/stap function proc:string() { return sprintf("PID(%d) UID(%d) PROC(%s)", pid(), uid(), execname()) } probe syscall.open.return, syscall.stat.return, syscall.open64.return ?, syscall.stat64.return ? { filename = user_string($filename) if ($return < 0) { printf("failed %s on %s by %s\n", ...


1

vmlinux: A non-compressed and non-bootable Linux kernel file format, just an intermediate step to producing vmlinuz. vmlinuz: A compressed and bootable Linux kernel file. It is actually zImage or bzImage file. zImage: For old kernels, just fit 640k ram size. bzImage: Big zImage, no 640k ram size limit, can much larger. Please refer this ...


0

Just use sed. sed -i -re 's,(always @ \(posedge clock) [^)]*,\1,' source.v or, sed -i -re 's,(always @ \(posedge clock) ,\1) //,' source.v


3

A loop device is a particular type of block device, managed by the loop device driver. A loop device is a block device whose content is stored in a file, similar to the way a SCSI disk device is a block device whose content is stored on a SCSI disk, a USB storage device is a block device whose content is stored on a USB storage peripheral, etc. Linux has a ...


1

Linuxbrew requires Ruby 1.8.6 or newer. Ruby 1.8.6 is the version where the RUBY_PATCHLEVEL constant was defined, as well as other features that Linuxbrew needs anyway. Ruby 1.8.6 came out in March 2007, so this shouldn't be a very onerous requirement. If you have a very old system (CentOS 5?) you'll need to install a more recent version of Ruby. RVM is an ...


0

Something like this should do it: strace -f \ -e trace=open,stat,stat64,lstat,lstat64,chdir,mkdir,rename,symlink,creat \ -o >(grep "the paths you want to catch" > log) \ commandToStartYourServer You want the -f switch to track children processes. The trace options are a subset of what fabricate uses to trace IO (fabricate traces ...


2

Some package managers support relocation. RPM in particular supports relocation, where the package itself has been built to support it. More information on rpm --relocate at rpm.org:Relocatable packages A comment by the maintainer of yum in 2008 (Seth Vidal) suggests that support for relocation within yum is unlikely. yum mailing list:Yum relocate option


1

Looks like there was a patch for this. See this site: Marvel Patch


0

If you compile a pristine GCC from source downloaded from its site, the default prefix is /usr/local/, not /usr/. Use which gcc to understand what gcc is in your PATH then try gcc -v; then use echo $PATH to understand the current setting of your PATH So your gcc is /usr/local/bin/gcc but the system gcc is still /usr/bin/gcc (In some Linux distributions, ...


3

Also note that the error you gave above ln: creating symbolic link `/etc/init.d/jboss1': Permission denied is not due to the owner of the symlink being somebody else than the owner of the original file. It is (most probably) caused by user askar not having write access to the directory /etc/init.d.


3

Your question is stated in a rather chaotic way, but this is what I understand: You're talking about enabling your wireless network adapter using a command that requires root privileges (hence run using sudo). The command you're executing actually removes a module (see man modprobe under the -r option). It was probably suggested that you remove the ...


0

As you're not using X Windows but console only, it doesn't seem to have anything to do with Linux. You should probably look into your BIOS settings.


7

On a Linux system, when changing the ownership of a symbolic link using chown, by default it changes the target of the symbolic link (ie, whatever the symbolic link is pointing to). If you'd like to change ownership of the link itself, you need to use the -h option to chown: -h, --no-dereference affect each symbolic link instead of any referenced ...


2

When acting on symlinks, you must tell most of the tools (chown, chmod, ls...) not to dereference the link: you must add the -h parameter, as stated in the manpage : -h, --no-dereference affect symbolic links instead of any referenced file (useful only on systems that can change the ownership of a symlink) So try : sudo chown -h askar.admin ...


0

It is not possible to create manually (in the usual way) a directory in /proc because it is not really a filesystem: it's a way for the kernel to show system and process information in a hierarchical, filesystem-like structure. The only way someone could create a directory under proc is by writing a kernel module that does so, but that would mess up things ...


0

Found a solution to the problem! Thanks for your input. I booted into the GRUB and then went to the Root shell interface as you suggested. From there I tried to repair permissions, but it said that even as an owner, I could only read and write. I went digging around for hours when I read somewhere that the desktop environment called LXDE doesn't deal with ...


3

No part of the official kernel currently does that, nor any third-party kernel module that I've seen. Only a kernel component could do that. I think that /proc/[0-9]* is common enough in shell scripts that no official kernel component will ever do that.


0

To change the hostname on a SUSE system you need to change the following files: /etc/HOSTNAME /etc/hosts You may also have other configuration files where it's stored (e.g., postfix configuration files), so a grep -R for the old hostname in /etc is probably a good idea: grep -R <oldhostname> /etc where <oldhostname> is the old hostname).


3

If you want to know the driver for your internal USB : lspci| grep USB This will list you the USB devices like : 00:14.0 USB controller: Intel Corporation 7 Series/C210 Series Chipset Family USB xHCI Host Controller (rev 04) 00:1a.0 USB controller: Intel Corporation 7 Series/C210 Series Chipset Family USB Enhanced Host Controller #2 (rev 04) 00:1d.0 USB ...


0

you can try dmesg | grep usb mine have the line: ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver


0

I know this is an old post but I had a similar but different issue. My issue was that I had a HDD with data and accidentally used "pvcreate" on it and realized that I could no longer access data on the disk (ooops). I tried a bunch of things and after a couple nights of research I stopped thinking about undoing my mistake and started thinking about ...



Top 50 recent answers are included