Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Take an LVM snapshot using a loopback device Create the snapshot
Take a look at the devices in your volume group. First there needs to be sufficient space in the volume group for a snapshot to occur. Check this by typing: vgdisplay and checking for Free PE / Size
Code:
vgdisplay -v
Create a loopback device to use for the snapshot. My volume group is named vg_echo360. I want my snapshot to be 9.9GB in size so I'm creating a loopback device which is 10GB in size....
I wanted to generate MD5 checksums of a whole bunch of files in a directory. It turns out that this is not as straightforward as it should be. IMO it should be completed with: md5sum -br *
Unfortunately it was not as straightforward. I found this blog entry after searching for a while and adapted this to what I needed. To generate checksums, I used the following:
Recently I wanted to manipulate files only in the current directory (not sub-directories). I usually use the following combination...
Code:
find . -type f -print0 | xargs -0 somecommand
The only problem I had with that was it ran through all sub-directories as well. Then I remembered the -m switch for ls and decided to depend on my good old friend sed.
applies to: linux, find, xargs, convert, image processing
'convert' command, which is a part of ImageMagick package can be used for image resizing, but it lacks ability to process multiple files (in version of ImageMagick 6.5.7-8 2010-12-02). Instead of writing a shell script you can use find and xargs commands to collect filenames and invoke convert with one filename at a time, like this:
We refer to a file by its name. Computer refer to the file by its inode numbers. For every filesystem; there is an inode table. This table consists of Inode numbers & its correspondingmetadata. On the contrary; the mapping of filenames to inode numbers is stored in the directory containing the file.
To display the inode number of a file; say hindu one must issue the command
Code:
ls -i hindu
To display the total number of inode numbers in the filesystem ; you must issue the command...
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.