Run this in / in a chroot to get your own proc there.
Saved my day, when my harddrive got stuck in read-only mode.
To unmount, replace "attach" with "eject"
Packages: gmailfs fuse-utils libfuse2 gvfs-fuse
Config files: /etc/gmailfs/gmailfs.conf; ~/.gmailfs.conf (make a copy from the another one)
Unmount:
fusermount -u /mount/path/
/etc/fstab (Optional):
none /mount/path/ gmailfs
noauto,user[,username=USERNAME,password=PASSWORD,fsname=VOLUME] 0 0
NOTES:
- The options between [] are optional since they already setuped on the config files.
- The '-p' flag shows a prompt for the password entry.
- It's necessary to add the user to the 'fuse' group. You can do that with:
sudo chgrp fuse /dev/fuse
and
sudo usermod -a -G fuse USER
- The volume name is not needed but highly recommended to avoid file corruption. Also choose a non-trivial name.
- Google doesn't approve the use of Gmail account other than e-mail purposes. So, I recommend the creation of a new account for this.
Assuming we have a disk image, ie. created by
dd if=/dev/sda of=image.dd
we can check the image's partition layout with
fdisk -ul image.dd
then, we substitute "x" with starting sector of the partition we want to mount. This example assumes that the disk uses 512 B sectors
Automatically drops mount points that have non-numeric sizes (e.g. /proc). Tested in bash on Linux and AIX. Show Sample Output
While `sshfs $REMOTE_HOST:$REMOTE_PATH $LOCAL_PATH` "pulls" a directory from the remote server to the local host, the above command does the reverse and "pushes" a directory from the local host to the remote server. This makes use of the "slave" option of sshfs which instructs it to communicate over plain stdin/stdout and the `dpipe` tool from vde2 to connect the sftp-server stdout to the sshfs stdin and vice-versa.
To rip DVD movie to ogg format using ffmpeg, follow these steps. 1) find the vob files on the mounted video DVD in VIDEO_TS that stores the movie itself. There would be a few other VOB files that stores splash screen or special features, the vob files for the movie itself can be identified by its superior size. You can verify these vob files by playing them directly with a player (e.g. mplayer) 2) concatenate all such vob files, pipe to ffmpeg 3) calculate the video size and crop size. The ogg video size must be multiple of 16 on both width and height, this is inherit limitation of theora codec. In my case I took 512x384. The -vcodec parameter is necessary because ffmpeg doesn't support theora by itself. -acodec is necessary otherwise ffmpeg uses flac by default.
Add the functions to the .bashrc to make it work Example: First go to the iso file directory and type: ---------------------------------------------------------------------------------------------------- user@box:~$ miso file.iso ---------------------------------------------------------------------------------------------------- It will put you into a temporary mounting point directory (ISO_CD) and will show the files You can umount the iso file whatever the directory you are ---------------------------------------------------------------------------------------------------- user@box:~/ISO_CD$ uiso ---------------------------------------------------------------------------------------------------- It wil umount the iso file and remove the temporary directory in your home
the middle command between the ; and ; is the vi commands that insert that line into the last line of the file, the esc with the carets is literally hitting the escape key, you have to have the smbfs package installed to do it, I use it to access my iTunes music on my mac from my linux PC's with amarok so I can play the music anywhere in the house. among other things, it allows you to access the files on that share from your computer anytime you're on that network.
Like symlinked directories, you can mount a directory at a different location. For example mounting a directory from one location in to the http root without having to make your program follow symlinks or change permissions when reading.
find largest file in /var
Instead of calculating the offset and providing an offset option to mount, let lomount do the job for you by just providing the partition number you would like to loop mount.
if you use disk-based swap then it can defeat the purpose of this function.
Will append lines to the hosts file to do some basic ad blocking.
Live extension of an ext3 file system on logical volume $v by 200GB without the need to unmount/remount. Requires that you have 1) a version of resize2fs that contains code merged from ext2online, and 2) kernel support for online resizing. (e.g. RHEL 5)
Requires sysfs mounted on /sys - may only be useful for Linux systems. Could also use "printf '%-8s %s\n' $(basename $f) $(cat $f/address)" instead of echo. Show Sample Output
Shows all block devices in a tree with descruptions of what they are.
This will show all physically connected SATA (and SCSI) drives on your system. This is particularly useful when troubleshooting hard disks.... or when a mount point seems to be missing. Show Sample Output
The command is useful when, e.g., booting an existing system with a rescue or installation CD where you need to chroot into the hard-disk and be able to do stuff which accesses kernel info (e.g. when installing Ubuntu desktop with LVM2 you need to mount and chroot the hard disk from a shell window in order to install packages and run initramfs inside chroot). The command assumes that /mnt/xxx is where the chroot'ed environment's root file system on the hard disk is mounted.
First look into /etc/modules if you have unionfs (or squashfs) support. If not, add the modules. UnionFS combines two filesystems. If there is a need to write a file, /tmp/unioncache will be used to write files (first create that directory). Reads will be done where the file is found first. http://tldp.org/HOWTO/SquashFS-HOWTO/creatingandusing.html
commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.
Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.
» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10
Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):
Subscribe to the feed for: