Android Backstage, a podcast by and for Android developers. Hosted by developers from the Android engineering team, this show covers topics of interest to Android programmers, with in-depth discussions and interviews with engineers on the Android team at Google. Subscribe to Android Developers YouTube → https://goo.gle/AndroidDevs
…
continue reading
Content provided by HPR Volunteer and Hacker Public Radio. All podcast content including episodes, graphics, and podcast descriptions are uploaded and provided directly by HPR Volunteer and Hacker Public Radio or their podcast platform partner. If you believe someone is using your copyrighted work without your permission, you can follow the process outlined here https://ppacc.player.fm/legal.
Player FM - Podcast App
Go offline with the Player FM app!
Go offline with the Player FM app!
HPR4332: Top 5 mistakes every new terminal user makes
MP3•Episode home
Manage episode 470705608 series 108988
Content provided by HPR Volunteer and Hacker Public Radio. All podcast content including episodes, graphics, and podcast descriptions are uploaded and provided directly by HPR Volunteer and Hacker Public Radio or their podcast platform partner. If you believe someone is using your copyrighted work without your permission, you can follow the process outlined here https://ppacc.player.fm/legal.
Learning to use the terminal is an important step in becoming a true power user of Linux, but it’s easy (and normal) to make mistakes along the way. Here are the top 5 mistakes new terminal users make, and what you can learn from them. 1. Current working directory When you first open a terminal, your current working directory is your home folder. You have access to all those directories you see in your home directory every time you open a file manager (Desktop, Documents, Downloads, Music, Pictures, and Videos). You can verify your location with the pwd command: $ pwd /home/seth You can list the files and folders within your current directory with the ls or dir or tree commands: $ ls Desktop Documents Downloads Music Pictures Videos But you don’t usually stay in one place while using the terminal. You frequently move from folder to folder so you can open or modify or edit files. It’s easy to get lost, forgetting what directory you’re in and what files are around you. Lesson learned: When working in the terminal, it’s important to regularly verify your current working directory with pwd so you don’t accidentally issue a command you intended to run in a different location. 2. Use interactive options when using wildcards Wildcards are great shorthand to make command entry faster, and to perform bulk actions on lots of files. However, they can be dangerous when you get them wrong. It’s easy to process hundreds of the wrong files by using a wildcard in the wrong directory, or by using a wildcard that’s too broad. For example, suppose you want to run a sed command on all HTML files in a directory, so you run this: $ sed --in-place 's/day/night/g' *ml Job done, until you find out that you accidentally ran that command on all your XML files, too. Lesson learned: Run a safe test command on the wildcard you think you want to target before making a change. Some commands have a literal --dry-run option. Others have an --interactive option that forces the command to prompt you to confirm that you want to carry out the action. Sometimes the logic is reversed: a command refuses to make a major change unless you use a command (for example, sed doesn’t write changes to a file without the --in-place option or redirection). When in doubt, improvise. You can always “expand” a wildcard using the echo command: $ echo ./*ml ./four.html ./one.xml ./three.html ./two.xml $ echo ./*tml ./four.html ./three.html 3. File paths Many new terminal users don’t understand where files are located within the file system. It’s not a common mistake to make on the desktop because there are visual reminders there. You wouldn’t try to double-click on a document to open it if there was no icon to double-click. It’s easy to assume that the terminal application contains all your files all at once, but the terminal is, by design, limited in scope. Were the terminal to
…
continue reading
4385 episodes
MP3•Episode home
Manage episode 470705608 series 108988
Content provided by HPR Volunteer and Hacker Public Radio. All podcast content including episodes, graphics, and podcast descriptions are uploaded and provided directly by HPR Volunteer and Hacker Public Radio or their podcast platform partner. If you believe someone is using your copyrighted work without your permission, you can follow the process outlined here https://ppacc.player.fm/legal.
Learning to use the terminal is an important step in becoming a true power user of Linux, but it’s easy (and normal) to make mistakes along the way. Here are the top 5 mistakes new terminal users make, and what you can learn from them. 1. Current working directory When you first open a terminal, your current working directory is your home folder. You have access to all those directories you see in your home directory every time you open a file manager (Desktop, Documents, Downloads, Music, Pictures, and Videos). You can verify your location with the pwd command: $ pwd /home/seth You can list the files and folders within your current directory with the ls or dir or tree commands: $ ls Desktop Documents Downloads Music Pictures Videos But you don’t usually stay in one place while using the terminal. You frequently move from folder to folder so you can open or modify or edit files. It’s easy to get lost, forgetting what directory you’re in and what files are around you. Lesson learned: When working in the terminal, it’s important to regularly verify your current working directory with pwd so you don’t accidentally issue a command you intended to run in a different location. 2. Use interactive options when using wildcards Wildcards are great shorthand to make command entry faster, and to perform bulk actions on lots of files. However, they can be dangerous when you get them wrong. It’s easy to process hundreds of the wrong files by using a wildcard in the wrong directory, or by using a wildcard that’s too broad. For example, suppose you want to run a sed command on all HTML files in a directory, so you run this: $ sed --in-place 's/day/night/g' *ml Job done, until you find out that you accidentally ran that command on all your XML files, too. Lesson learned: Run a safe test command on the wildcard you think you want to target before making a change. Some commands have a literal --dry-run option. Others have an --interactive option that forces the command to prompt you to confirm that you want to carry out the action. Sometimes the logic is reversed: a command refuses to make a major change unless you use a command (for example, sed doesn’t write changes to a file without the --in-place option or redirection). When in doubt, improvise. You can always “expand” a wildcard using the echo command: $ echo ./*ml ./four.html ./one.xml ./three.html ./two.xml $ echo ./*tml ./four.html ./three.html 3. File paths Many new terminal users don’t understand where files are located within the file system. It’s not a common mistake to make on the desktop because there are visual reminders there. You wouldn’t try to double-click on a document to open it if there was no icon to double-click. It’s easy to assume that the terminal application contains all your files all at once, but the terminal is, by design, limited in scope. Were the terminal to
…
continue reading
4385 episodes
All episodes
×Welcome to Player FM!
Player FM is scanning the web for high-quality podcasts for you to enjoy right now. It's the best podcast app and works on Android, iPhone, and the web. Signup to sync subscriptions across devices.