Schlagwort: terminal

Leave a reply

Mount EXT4 devices on your Mac (read only)

If you have ext4 formatted Harddrive (like the external Devices you have formatted on your Synology) you will not be able to access the Files by just plugin in the HDD to your Mac. The easiest way to fix this is with Fuse and ext4fuse.

I would recommend to do the software installation with homebrew. This is a paketmanager for your Mac. To install it follow the instruction on Homebrew or just copy this command to your terminal press „Enter“

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"

After the successful installation you can install Fuse by downloading the package from the project site FUSE for Mac then you have to install ext4fuse by tipping

brew install ext4fuse

in your Terminal window. Now everything is prepared to get access to your external HDD. First you have to find the device you want to mount. For this we us the command:

diskutil list

there you should get an output looking like this and you can find the „IDENTIFIER“ for the Harddrive we want to mount

Next thing is that we have to create a folder in which we want to set the mount point. In our example we create it in the system „tmp“ folder because this will be cleaned up after a reboot. The folder is called „Ext4HDD“ and you can do it by tipping following in your terminal

mkdir /tmp/Ext4HDD

Now you can mount the before identified disk „disk2s1“ to the new created folder

sudo ext4fuse /dev/disk2s1 /tmp/Ext4HDD/ -o allow_other 

You can now easy access the files by using the finder and browse the folder structure. If you want to unmount the device again please use following command

sudo umount /tmp/Ext4HDD/

Leave a reply

Mac ISO to USB Stick

How to create a bootable USB Stick from a ISO file.

First you have to convert the iso file to a img file. This command will do the work.

hdiutil convert -format UDRW -o /path/to/source /path/to/destination

Then you have to find the attached USB device

diskutil list

Now search for device (for example: /dev/disk3)
and eject this device

diskutil unmountDisk /dev/diskN

Now you can start the copy process (be careful that you choose the right device, all datas on this device will be deleted!!)

sudo dd if=/path/to/source.img of=/dev/diskN bs=1m

Don’t forget to eject the device again before unplugging

diskutil unmountDisk /dev/diskN

 


Leave a reply

screen commands

Screen

Use the command „screen“ to open a virtual terminal session in you actual session. The sessions will stay active until you terminate them.

Installation:

MacOS X
# build in
Debian
# apt-get install screen

normal use:

# create new session
screen -S "NAME"
# detach session
Ctrl + A & Ctrl + D
# list open sessions
screen -ls
# reattach to session
screen -r "NAME"
# if you only have one session you can use
screen -x

 

man:

-a Force all capabilities into each window’s termcap.
-A -[r|R] Adapt all windows to the new display width & height.
-c file Read configuration file instead of ‚.screenrc‘.
-d (-r) Detach the elsewhere running screen (and reattach here).
-dmS name Start as daemon: Screen session in detached mode.
-D (-r) Detach and logout remote (and reattach here).
-D -RR Do whatever is needed to get a screen session.
-e xy Change command characters.
-f Flow control on, -fn = off, -fa = auto.
-h lines Set the size of the scrollback history buffer.
-i Interrupt output sooner when flow control is on.
-list or -ls. Do nothing, just list our SockDir.
-L Turn on output logging.
-m ignore $STY variable, do create a new screen session.
-O Choose optimal output rather than exact vt100 emulation.
-p window Preselect the named window if it exists.
-q Quiet startup. Exits with non-zero return code if unsuccessful.
-r Reattach to a detached screen process.
-R Reattach if possible, otherwise start a new session.
-s shell Shell to execute rather than $SHELL.
-S sockname Name this session <pid>.sockname instead of <pid>.<tty>.<host>.
-t title Set title. (window’s name).
-T term Use term as $TERM for windows, rather than „screen“.
-U Tell screen to use UTF-8 encoding.
-v Print „Screen version 4.00.03 (FAU) 23-Oct-06“.
-wipe Do nothing, just clean up SockDir.
-x Attach to a not detached screen. (Multi display mode).
-X Execute <cmd> as a screen command in the specified session.


Durch die weitere Nutzung der Seite stimmst du der Verwendung von Cookies zu. Weitere Informationen

Die Cookie-Einstellungen auf dieser Website sind auf "Cookies zulassen" eingestellt, um das beste Surferlebnis zu ermöglichen. Wenn du diese Website ohne Änderung der Cookie-Einstellungen verwendest oder auf "Akzeptieren" klickst, erklärst du sich damit einverstanden.

Schließen