#command line
13 posts tagged command line. Clear filter
-
How to Use the Ls Command on Linux or Mac OS X to Sort Files based on Second in the Timestamp
Here is the one liner. ls -lhtTr It will output something like total 24152 -rw-rw-r-- 1 sean staff 1.0M May 4 14:31:42 2019 4c2caf52cb084ea39a6a65a0e68ee382 -rw-rw-r-- 1 sean staff 1.0M May 4...
-
How to Time Piped *nix Commands
If you want to time how long a piped bash command take, use the time command followed by your commands in parens like so.. time (ls -lha | wc -l)
-
How To Create a Dump File in Postgres Compatible with Heroku
When Heroku creates a dump file of your Postgres database it uses the -Fc option It is equivalent to running pgdump -Fc -d nameofdb nameofdb.dump This command will let you import your database with...
-
How to Fix Pypi Upload failed (403): Invalid or non-existent authentication information.
If you run into authentication failure when trying to upload packages Submitting dist/<package name to https://upload.pypi.org/legacy/ Upload failed (403): Invalid or non-existent authentication...
-
Find a File On Your File System with the Unix Find Command By Extension
find path/ -name .txt
-
A Couple of Usefule Snippets When Working with Textmate
Here is the snippet f path/to/directory 'search string' | open\in\mate This snippet (technically 2 snippets) will recursively scan the contents of files in a directory and then open all the files...
-
How To Pipe To A Ruby Command Line Application
You need to read from STDIN rather than parse command line arguments. while $stdin.gets puts $ end
-
How to Split a Large File Into Smaller Files on OSX or Unix
Use the split command. You can set the number of lines (the "-l" flag) to split on and also the location of where the split files should be saved. Note, the output directory must already exists.
-
Recursively Search Contents of a File with Grep
The -r flag is for recursive, meaning it will also look in sub directories. The -i flag is for case insensitivity, meaning WORD and word will both be found.
-
How To Create Blurry Background Images Programmatically from the Command Line or with Ruby
Turn this into this You can use ImageMagick to make blurry images. To install with Homebrew on OS X. After installing you can run from the command line You can run this from your Ruby scripts with...
-
Launch Photoshop (Or Any App) From The Command Line on Mac OS X
I often find myself coding with the terminal open. Cding around a web app project I usually end up at some point launching Photoshop. Either to touch up or work on a psd, png, jpg ...etc. I fire up...
-
Recursively Zip a Directory and Files on Linux
It's Short and sweet! Just remember that the finished zip filename is the first argument and the directory you wish to recursively zip comes after. zip -r nameofyourdirectory.zip...
-
Add Users to a Group on Ubuntu
To create a new user on Ubuntu (Heron8) adduser johndoe To create a new group groupadd barleyfarmers Add johndoe to the barleyfarmers group adduser johndoe barleyfarmers The adduser command, when...