Adding something to $PATH
Type in the console: export PATH=$PATH:/new_path_entry
Type in the console: export PATH=$PATH:/new_path_entry
Just type this command: uptime
Please execute following command: ifconfig | grep netmask
Install the small nice applications called “Flip” with: brew install flip and then execute following command: flip -u filename Options: -u = convert file(s) to Unix newline format (newline) -d = convert file(s) to MS-DOS/Windows newline format (linefeed + newline) -m = convert file(s) to Macintosh newline format (linefeed) -t = display current file type,… Read More »
Install and enjoy: http://totalterminal.binaryage.com/
Paths on Mac: /etc/php.ini /private/etc/php.ini /etc/apache2/httpd.conf /etc/apache2/extra/httpd-vhosts.conf /etc/hosts
To display full path: defaults write com.apple.finder _FXShowPosixPathInTitle -bool YES To revert this changes: defaults write com.apple.finder _FXShowPosixPathInTitle -bool NO Apply changes with: killall Finder
Just execute following command in your terminal (~ is the home directory): scp filename.txt username@hostname.org:~ Uploading directory with all files inside it: scp -r dirname username@hostname.org:~
Legend: u – users g – groups o – others a – all To add a write permissions for the user (+ because we want to add them): chmod u+w file To remove a read/write permissions for the group (- because we want to remove them): chmod g-rw file Specifying multiple permissions per once: chmod… Read More »
Counting the number of words in file: cat file.txt | wc -w Searching the output for “uzza” word: cat big-file.txt | grep uzza Gzipping files: gzip some_file.txt Decompressing Gzipped files: gzip -d some_file.txt.gz Creating archive of directory: tar -cvf archive-name.tar some-dir c – creating new archive v – verbose f – we want to specify… Read More »