is there a way to create a snapshot of a logical volume (lv1) that resides into volume group vgA inside a different volume group (say vgB)? i have my root logical volume in volume group vgA on the SSD and i want to take a snapshot of the volume on the second volume grout vgB that sits onto the mechanical
Tag: linux
mount fails from spawned process
I want to start a process that uses a USB hard drive once it gets inserted. Since UDEV rules specifically mentions not to run long-time processes from RUN command, I send a FIFO message to my service which then opens the relevant process. So the flow goes like this: UDEV > runs action process > sends FI…
C: strtok and newlines in Windows vs Linux
I’m working on a C school assignment that is intended to be done on Windows, however, I’m programming it on OS X. While the other students working on Windows don’t have problems reading a file, I do. The code provided by the tutors splits the contents of a file on n using this code: However,…
How to manipulate text lines and Create two separate files for odd and even
How to manipulate text lines and Create two separate files for odd and even ? file 1: file 2: Answer I’d say This will print lines in inputfile that end with 1, 3, 5, 7, or 9 to file1 and all others to file2.
Using linux system commands in R to remove special characters
I’m trying to clean files using linux system commands in R I would like to use a command that removes special characters apart from the file separator (pipe delimited) In the example below it’s the slashes and additional quotation marks that I’m trying to get rid of I’ve used the comma…
Python 3.4.3 subprocess.Popen get output of command without piping?
I am trying to assign the output of a command to a variable without the command thinking that it is being piped. The reason for this is that the command in question gives unformatted text as output if it is being piped, but it gives color formatted text if it is being run from the terminal. I need to get
chmod – protect users’ file being accessed so only owner can access?
How to set chmod, so that ONLY owner of the file can read, write and execute? (other users cannot read, write, and execute) Answer chmod 600 filename will do it; or chmod 700 if it is an executable. Another way that is less cryptic is: chmod go-rwx filename The “g” is for group The “o”…
How to find newest files with a certain name?
Suppose I have a directory with many files of the same name in subdirectories (for example, comes up when keeping BibTeX files for multiple academic papers). What’s the best way to find the newest version of a file with a given name? I’ve come up with the following command which lists all the file…
Makefile dealing with different source and object directories under Windows and Linux
I have a problem creating a Makefile for a project with source files scattered in different folders. As the source files might have the same names, I’d like to send the objects into different folders as well. With a single source and object file, I’m doing fine following rules like posted elsewher…