Jump to content
InsanelyMac Forum
Sign in to follow this  
p.H

What is Terminal ?

Recommended Posts

By LordPum

 

Original Post ( Italian ) : http://www.insanelymac.com/forum/topic/222809-terminale-cose/

 

Things about the terminal ?

We may have seen the word "terminal" many times. But not everyone knows what the terminal really is.

First of all, it is an application located in /Applications/Utilities. The use of terminal is derived from UNIX which allows you to control the machine only through the command line. In fact, the terminal is present in OS X because OS X itself is based on UNIX. The usefulness of terminal lies in the fact that many operations can be performed much faster with the terminal and it allows us to use administrator privileges, as may be required.

 

EXAMPLE:

If you want to delete a file from the recycle bin(Or Trash in OS X), but you are told that the file is protected and continuing expunging could do harm to your system. But you're sure that deleting this file won't cause you trouble though system warns. You can try with the terminal.

rm insanely.txt is deleting the file insanely.txt

 

What if you have lots of files which you want to eliminate? You can also use terminal in the following way:

cd .Trash
sudo rm -dfri *.*

After each line, you should press "Enter". The command rm means eliminate, while sudo means that you want to delete as root, the administrator of the computer. You will be prompted for the password every first time you use the sudo command.

Option "-dfri" is needed for this:

- the r is used to delete the subdirectories of the directories in the trash

- the d is used to remove the files in the directory in the trash

- the f is used to force the cancellation or ignored if the file is protected or "apparently "used by some processes

- the i is used to ask you to confirm the deletion of the files. Do not use if you are going to delete many files, but it could be useful in the case where you are unsure of what the rm command would delete.

At last, *. * indicates the file to be deleted. In this case it represents all files in the folder.

 

For more information: http://www.insanelymac.com/forum/index.php?showtopic=225608

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.



  • Similar Content

    • By ITzTravelInTime
      Hi guys, this thread is to show you a new and open source app, created by me, that I called TINU:
       
      The name means: TINU Is Not #####, the U refers to a popular software that is used to create Mac OS hackintosh installers (that for good reasons is banned on this forum), but the aim of the name is to explain that this app is a totally different thing from that software and works in a totally different way.
       
      This app basically is a graphical interface for the createinstallmedia executable that is inside the Mac OS installer apps, it is capable to create a Mac OS installer on a drive completely vanilla like what you do using the command line method, and also this method is recommended by apple itself.
       
      Allows you to create easily a macOS install media without messing around with command line stuff and without using disk utility, all you need to do is use the app and then install clover on the usb drive once TINU has finished or leave it as is you want to use it on a Mac.
       
      Features:
        - Simple to use UI that allows you to easily start the macOS install media creation process   - It can work with every Mac OS installer app that has the createinstallmedia executable inside of it's resources folder (including also beta and newly released installers)   - You can use any drive or partition you want that can be erased and is at least 7 GB of size   - Works on Mac OS recovery, so you can create a macOS install media from a bootable macOS installer or from the macOs recovery   - All vanilla, the macOS install medias created with this tool are 100% vanilla, just like you created them using the command line "createinstallmedia" method   - Open source, you will know what this program does on your computer and also you can create your own version by downloading and playing with the source code   - Does not requires to do anything of special first, just open the program   - No need to go in disk utility first, TINU can format your drive for you   - Uses recent and more modern APIs and SDKs and Swift 3 language   - Transparent graphics style available (use alt + s on the keyboard or View->Use transparent style)   - Works using the latest versions of macOS and will also support newer Mac installers out of the box without needing for an update    Features that I'd like to add in the future:    - Advanced section, to customize your macOS install media   - Installer customization: Kernelcache/prelinkedknerel and boot files replacement (a feature that can be handy while dealing with old Macs or with beta installers when you need to mod or change the boot files some times)   - Install clover and configure clover   - Install kexts inside the kexts folder of clover   - Clover drivers customization   - Use custom dsdt in clover   - integrated pre-made clover config templates database from a remote and open repository   - Support for other languages, at least Italian   Rquirements:  - A computer that runs Mac OS X Yosemite or a more recent version (Mac OS X El Capitan is required to use TINU in a macOS recovery or installer)  - A drive or a free partition of at least 7 GB that you want to turn into a macOS/Mac OS X installer  - A copy of a macOS/Mac OS X installer app (Maveriks or newer versions are supported) in the /Applications folder or in the root of any storage drive in your machine (excepted the drive or volume you want to turn into your macOS install media)   Note that this app is under the GNU GPL v3 license so any reuse of the source code must follow the license's terms   TINU 1.1 Stable release:    - Download available here:    https://github.com/ITzTravelInTime/TINU/releases    - Source code:     https://github.com/ITzTravelInTime/TINU   TINU 2.0 pre-release:    - Source code:    https://github.com/ITzTravelInTime/TINU/tree/development    - Download available here:    https://dl.dropboxusercontent.com/s/nvzss51qcieynve/TINU.zip     Frequently asked questions about TINU: https://github.com/ITzTravelInTime/TINU/wiki/FAQs     NOTE: if you have problems with your USB installer of 10.13.4 or newer version not being detected by clover you have to use the latest clover and if it still does not detectets your usb installer you have to remove the invivible file called .IAPhysicalMedia located into the root of the usb installer. This issue is caused by a changement in the apple's createinstallmedia, don't blame TINU for that, tinu does only uses the installer creation method from apple, which has been changed, causing this problem for hackintosh users, this issue should be resolved in the latest versions of clover which will no longer require that you do changements to let your usb dive to be detected, a setting to do this fix automatically in tinu is also comeing in a new pre-release of TINU 2 I leave also some screenshots as well








    • By betitogc2
      I have a Mac mini server with Yosemite, and I plugged a VGA Display using a VGA/HDMI adapter.
      The issue is, when I shut down or restart the server, the display is not recognized, then I need to go to unplug and plug again, and server now recognizes the display.
      I need to know how to make a logical "reconnection" for the adapter.
      For example on Windows I use a devcom application to enable or disable the devices.
      I was reading that the possible solution is using a kextunload command on terminal.
      I don't know which kextfile I need to "unload" for the HDMI adapter.
      On terminal:
      /System/Library/Extensions/
      kextunload exampleflile.kext
      kextload examplefile.kext
      Anybody have an idea about my issue? Another way to solve it?
      Thanks in advance
      Greetings from Mexico.
         
    • By Col Crunch
      Ok, so I am not sure if this is the best place for this post, but from the descriptions of the categories, it seemed to me to be the most fitting.
       
      Anyways, on to the topic of the post:
       
      The command key; an incredibly uncomfortable key to use, for me, and with the frequency in which I move between windows and OS X, it is just inconvenient to have to get used to the physical difference that often. 
       
      So, what I am looking for is a way to remap the command and control functions to the inverse keys, except in terminal (where Control+C is still Control+C). This would obviously have no affect on shortcuts that use Command and Control at the same time as I would be pressing both keys regardless (yes, someone on another forum, actually tried to tell me that this is a reason that such a remap would be a bad idea).
       
      Doe anyone out there know of an application that will let me do this.
       
      P.S if your response is "Just get used to it", please keep it to your self. I am obviously looking for this solution specifically so I don't have to sit there and be uncomfortable, and so that I can be more productive.
    • By kosakgroove
      More info at: http://www.thegroovykosak.blogspot.pt   Here is a video I made demonstrating the procedure.   https://www.youtube.com/watch?v=04SLD2Kft60     Download your distro of choice, in my case Ubuntu Gnome edition   Once that is done, use the command that follows to convert the iso to img: 
hdiutil convert -format UDRW ~/path/to/target.iso -o ~/path/to/ubuntu.img 
Note: OS X tends to put the .dmg ending on the output file automatically, delete the ".dmg" ending.   Run diskutil list to get the current list of devices   Insert your flash media   Run diskutil list again and determine the device node assigned to your flash media
(e.g. /dev/disk2)   Run
 diskutil unmountDisk /dev/diskN 
(replace N with the disk number from the last command; in the previous example, Nwould be 2)   Execute the following command while replacing /path/to/downloaded.img with the path where the image file is located; for example, ./ubuntu.img or ./ubuntu.dmg).   sudo dd if=/path/to/downloaded.img of=/dev/rdiskN bs=1m   Using /dev/rdisk instead of /dev/disk may be faster.   Run diskutil eject /dev/diskN and remove your flash media when the command completes   Restart your Mac and press Alt while the Mac is restarting to choose the USB-Stick or restart your PC and choose the USb from BIOS. This USB should work for any computer.   Note: (If you see the error dd: Invalid number '1m', you are using GNU dd. Use the same command but replace bs=1m with bs=1M. If you see the error dd:/devdiskN: Resource busy, make sure the disk is not in use. Start the Disk Utility.app and unmount (don't eject) the drive. )
        Thanks for watching        
    • By barney-geroellheimer
      Hello,
       
      I set up a new X99 workstation based on the Intel i7 5960X a few months ago and Yosemite works very well on it. Except of a "small" part I normally use heavily in my daily workflow: The Terminal
       
      Here is a descriptionof the problems I detected (maybe more are hidden but due to the problems I encountered I rarely use this workstation for development and fall back to my MacBook or my old Hack for now).
       
      The architecture of the system seems to not be recognised correctly. When I try to install homebrew I get an error that it doesn't find the target platform. So I tried to look at uname and found that it doesn't show the current kernel or anything:
      x99:~ me$ uname -a x99:~ me$ Same strange behaviour goes for find (in my home with quite a few folders and files):
      x99:~ me$ find . x99:~ me$ After wondering about this I started zsh and tried both commands:
      f35% find . zsh: exec format error: find f35% uname -a zsh: exec format error: uname What can I think of this? Any idea hear?
       
      I can't really imaging what went wrong there and why everything else works. I can throw different image/video apps up and haven't had problems yet. It's only on the Terminal where I'm not sure what's going on and normally I'm quite often using the Terminal as a long time Linux/*nix user and do many stuff with small scripts and use homebrew to install a bunch of tools also.
       
       
      Installation was done with a modified Kernel and a few modified extensions to get it running on the X99 platform.
×