Tags→ #Bash
-
Using GH to generate a new repo
gh is a lovely CLI tool from GitHub that lets you manage your repos from Terminal, including downloading license and .gitignore files.
-
Clearing commands list, and other tales of bash history
Clearing the command history is good practice when, for example, one has mistakenly pasted sensitive info.
❯ history -c
will do the trick. More details inside. -
Remove lines matching some patterns from all files in a dir
A CLI task I find myself doing often with sed
-
Copying sourcefiles without .git folders with cpio
Sometimes you need to copy your local version of a project under subversion to a new location, without all the .git stuff. Here's a couple of ways of doing it.
-
Dealing with extended attributes on OS X
Extended attributes store extra information about files in OS X. They replaced resource forks. Sometimes those extra hidden files confuse peripherals (e.g. mp3 players) that were not setup to deal with them. Here are some terminal commands to handle them.
-
A good place for scripts in OSX
Where to put unix based scripts on a Mac without them getting in the way? Simple: create a bin folder in your home directory, and add it to the path:
export PATH=~/bin:$PATH
-
Finding files inside an archive with Terminal
Looking for files inside an archive, without having to extract them first using Apple's Terminal.
-
Finding recently changed files with Terminal
Finding files that were changed in the last day, sorted by size, using Apple's Terminal
-
Batch unrar from the command line on Mac OS X
Rar is a popular archive format on the web. When I need to unarchive several rar files at once, I use RarLab's command line tool. Here's how