As someone to new to Mac, I did miss the PageUp, PageDown keys. I just found that you could use the arrows keys in combination with fn key.
fn + Up Arrow for Page Up
fn + Down Arrow for Page down
fn + Left Arrow for top of the file
fn + Right Arrow for bottom of the file
I am not sure why I haven’t searched for the solution earlier. Perhaps I am content with the navigation keys in vi/less.
G – bottom of the file
g – start of the file
We receive a 7z file and we want to extract it on the command line. We search on Google and we are confused because some examples use 7z and some others use 7za.
We can use both 7z or 7za or even 7zr as long as the format for the archive is 7z.
From Arch Linux Wiki:
7z uses plugins to handle archives.
7za is a stand-alone executable. 7za handles fewer archive formats than 7z, but does not need any others.
7zr is a stand-alone executable. 7zr handles fewer archive formats than 7z, but does not need any others. 7zr is a “light-version” of 7za that only handles 7z archives.
Create an archive of the current directory:
7z a filename.7z
Create an archive of a specific directory:
7z a filename.7z /path-to-dir
Extract a 7z archive in the current directory with full path:
7z x filename.7z
Extract a 7z archive in the current directory without directory names:
7z e filename.7z
You should not have a “-” before a or x. It will not work, a will “Add files to archive” and x will extract an archive with full path.
If you have 7za binary, you can use it as well. In CentOS 7, 7z binary is available only after installing p7zip-plugins.
rpm -qf `which 7za`
rpm -qf `which 7z`
Whereas in Mac, brew install p7zip installs 7z, 7za and 7zr.
This will create a 7-zip archive of the current directory protected by a password
7z a filename.7z -pPASSWORD
where a stands “Add files to archive” and PASSWORD is the password. To archive a different directory use:
7z a filename.7z -pPASSWORD /path/dir
To extract this file
7z x filename.7z -pPASSWORD
where x stands for extract. You can use 7za where 7z binary is not available.
You can’t do “mount -o loop filename.iso /mount_point” in Mac like in Linux. You use hdiutil.
hdiutil mount filename.iso
hdiutul unmount /Volumes/mount_point