Forums
New posts
Articles
Product Reviews
Policies
FAQ
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Menu
Log in
Register
Install the app
Install
Forums
Apple Computing Products:
macOS - Operating System
using terminal
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="vansmith" data-source="post: 1101660" data-attributes="member: 71075"><p>If you want to use a tool that requires a file be passed to it, you either have to be in that directory or you have to give the full path. Let's start with option one (be in the directory). The first thing you need to do is use <em>cd</em> to change your directory. Let's say for the sake of this post that the file is on your Desktop. To change to the Desktop, enter the following:[code]cd ~/Desktop[/code](~ is shorthand for your user directory). You can now do the rm command you posted because you are now in the directory of the file.</p><p></p><p>Option two: using the full path. This is much quicker as it involves only one command. Simply type the following (again assuming the file is on your Desktop):[code]rm ~/Desktop/work.docx[/code]</p><p></p><p>Note that using rm will not move the file to the trash - if you rm a file, it's gone.</p><p></p><p>Tip: If you start typing a file, directory or command, push tab to have bash autocomplete it for you (saves time, trust me).</p></blockquote><p></p>
[QUOTE="vansmith, post: 1101660, member: 71075"] If you want to use a tool that requires a file be passed to it, you either have to be in that directory or you have to give the full path. Let's start with option one (be in the directory). The first thing you need to do is use [I]cd[/I] to change your directory. Let's say for the sake of this post that the file is on your Desktop. To change to the Desktop, enter the following:[code]cd ~/Desktop[/code](~ is shorthand for your user directory). You can now do the rm command you posted because you are now in the directory of the file. Option two: using the full path. This is much quicker as it involves only one command. Simply type the following (again assuming the file is on your Desktop):[code]rm ~/Desktop/work.docx[/code] Note that using rm will not move the file to the trash - if you rm a file, it's gone. Tip: If you start typing a file, directory or command, push tab to have bash autocomplete it for you (saves time, trust me). [/QUOTE]
Verification
Post reply
Forums
Apple Computing Products:
macOS - Operating System
using terminal
Top