vicker313 tech blog

March 27, 2009

How to split a tar file

Filed under: Linux — Tags: , — vicker313 @ 1:41 am

Some file systems have the 2GB file size limit, so when we tar something that over 2GB, we need to split it during the archiving. The following is the command:

tar -cvzf – /home | split -b 2000m – /mnt/big.tar

If you want to log the process, use this command:

(tar -cvzf – /home | split -b 2000m – /mnt/big.tar) > log.txt 2> log.txt

So to extract the split archives, use this:

cat big.tar* | tar -tzvf – # to view the archive

cat big.tar* | tar -xzvf – # to extract

cat big.tar* | tar -zx hello.txt -vf – # to extract only one file from the archives

March 17, 2009

Mount Samba shared folder in Fedora Core 9

Filed under: Linux — Tags: , , — vicker313 @ 1:33 am

Recently I am facing problem with mouting Samba folder in Fedora Core 9. The Samba folder is resided at a Fedora Core 4 machine. I think the problem occur because FC9 doesn’t support SMBFS any more, instead I need to use CIFS to mount the folder. The error is something like cannot find the shared directory or similar.

Same as usual, after few hours of googling, I finally found the solution:

echo 0 > /proc/fs/cifs/LinuxExtensionsEnabled

The command will disable the LinuxExtensionEnabled feature. After that the mounting can be proceed successfully.

However, since this file is not a permanent file, it only exists when you mount something with CIFS, so we need to set the following in /etc/rc.local:

/sbin/modprobe cifs

echo 0 > /proc/fs/cifs/LinuxExtensionsEnabled

Create a free website or blog at WordPress.com.