Misc Linux Commands
Here are some comman linux commands.
-
Zip a file or folder
-
To Zip a folder:#zip -9 -r <zip file> <folder name> -
To zip a single file:
#zip -9 <zip file> <filename>Use "-9" for best compression. The compressed file works fine with Windows XP compression tool.
-
-
Tar and Gzip archive command syntax:
-
Backup folder1 and folder2 directories and preserve files permission into tarball file named backup.tar
#tar -cvpf backup.tar folder1 folder2
*****extracting a tarball
#tar -xvpf backup.tarBackup folder1 and folder2 directories and preserve files permission into tarball file named backup.tar (gzip is compressing the folder as well)
#tar -zcvpf backup.tgz folder1 folder2
*****extracting a gzip compressed tarball file
#tar -zxvpf bkp.tgz
-
.htaccess rewrite rule
RewriteEngine on
RewriteRule ^filenameonly.html$ http://ikeeperonline.com/themain/content/custom-crm-solution [R=permanent,L]
Install the following utils to apply patches to your php code.
#yum -y install patchutils patch
Applying patch: add the patch file to the location where the file to be modified is located.
#patch < filename.patch
Reversing a patch:
#patch -R < filename.patch
Update webmin miniserv.conf
# sudo vi /etc/webmin/miniserv.conf
Restart Webmin:
# sudo /etc/webmin/restart




















Comments
Post new comment