Examples on how to find and replace text using the Linux command-line program awk.
How to create files, append to files, output a file to the screen, empty a file, and print line numbers with the linux utility cat.
How to copy a single file, multiple specific files and multiple files with a glob pattern using the UNIX command-line program cp (copy).
ContentsOverviewThe BasicsSpecial CharactersPredefined Timing WordsLoggingOverview Most web-servers give you the ability to setup and run cron tasks for maintaining your website. These are normally setup from cPanel or equivalent, and is called a webcron. The Basics To list the current crontabs type: Command To List Available crontabs Shell sudo crontab -l 1 sudo crontab -l … Continue reading cron
ContentsOverviewInstallingRunningConfig FileDNSDynamicOverview ddclient is a open-source client program written in Perl to update DNS entries on Dynamic DNS Servers. It supports a number of different routers and dynamic DNS servers. Website: http://sourceforge.net/projects/ddclient/ Usage: http://sourceforge.net/apps/trac/ddclient/wiki/Usage Installing You can install it with the command: Installing ddclient C sudo apt-get install ddclient 1 sudo apt-get install ddclient While installing, it … Continue reading ddclient
|df (disk free)|
Info on how to use the df (disk free) utility in UNIX-based operating systems.
ContentsOverviewCompare Two FoldersCompare Two FilesQuietning The OutputOverview The command-line Linux program diff allows you to check for differences between files and folders. Compare Two Folders The following command will make diff compare two folders: Shell diff Folder1 Folder2 1 diff Folder1 Folder2 Compare Two Files The syntax is pretty much the same as if you … Continue reading diff
|du (disk usage)|
ContentsOverviewTypical UsageOverview du (disk usage) is a UNIX-based program that is used for displaying estimated file space usage. It can recursively iterate through directories, listing the total space used by that directory and it’s contents. Note that the common ls command cannot do this, and will only display the space used by the directory and not it’s … Continue reading du (disk usage)
ContentsCreate NewAppend To Permanent Environment VariablesSee Current VariablesThe export command is used to make available variables and associated values for other programs called after the export command. When this happens the variable is called an environment variable. Create New For example, to make available to following programs the variable myVar, with a value of 5, you would … Continue reading export
ContentsMultiple PatternsCombining With sedMultiple Patterns You can provide find with multiple paterns by using the -o option. The following example looks for all files with the .cpp or .hpp file extension in the current directory. Shell find . -name "*.cpp" -o -name "*.hpp" 1 find . -name "*.cpp" -o -name "*.hpp" Combining With sed find, … Continue reading find
|fsck (File System Consistency checK)|
How to run fsck in non-interactive mode.
ContentsOverviewFind And Kill Processes By NameOverview kill is a UNIX-based program that makes it easy to “kill” (stop running) process running in the operating system. Find And Kill Processes By Name You can use the following bash shell command to find and kill processes by name (or partially by name). This is good if you have a … Continue reading kill
How to create symbolic (soft) links, hard links, and the differences between them.
How to list human-readable file sizes, find out what shell you are using, and more info about the UNIX command-line application ls (list).
Example commands and more information about meld, a diff/merging tool for Linux systems.
Helpful tips on how to use the UNIX serial terminal program called minicom.
ContentsOverviewBe Careful, Overwriting Is The Default!Overview The mv (a.k.a. move) program is commonly used on Linux systems to both move and rename files (to copy files, use the cp command). Be Careful, Overwriting Is The Default! Those of you who are used to Windows systems will appreciate the fact that you get “do you wish to overwrite?” … Continue reading mv (move)
ContentsInstallingReversing PagesInstalling pdftk can be installed with the following command on Debian-like systems (e.g. Ubuntu): Installing pdftk On Debian-Like Systems C sudo apt-get install pdftk 1 sudo apt-get install pdftk Reversing Pages The following example command reverses some of the pages in the pdf in.pdf. It has over 9 pages, and reverses the direction of … Continue reading pdftk
ContentsOverviewForce KillBe Careful!Overview pkill is a program that can be used to send a signal to a processes, by specifying a regex pattern that matches part of the process name (or it’s full command line name with the -f option). Force Kill The most direct way to kill a process is with: C sudo pkill -9 "this_matches_part_of_process_name" 1 sudo … Continue reading pkill
Information about the process printing program, ps, on UNIX systems.
ContentsOverviewBasic UsageOverview readelf is a program for displaying/disassembling information in .elf files. It is similar to the objdump program, but is more detailed. Basic Usage readelf can be run in one of it’s common forms by calling readelf myfile.elf -a from the terminal. This will print plenty of information to the terminal. Like this:Like Loading...
ContentsTo Check Changes Before Actually RenamingMaking All Filenames Title CaseTo Check Changes Before Actually Renaming The -n option allows you to check changes before actually renaming. This is very useful, and recommended, as there is no undo button once you have done the renaming! With this option present, rename will print a list of the … Continue reading rename
How to perform backups, copy large files, and other information about the UNIX program rsync.
|scp (secure copy)|
ContentsOverviewCopy File From Local To RemoteCopy Directory From Local To RemoteOverview scp (secure copy) is a UNIX command-line program. Copy File From Local To Remote Shell $ scp ~/myfile.txt email@example.com:~/ 1 $ scp ~/myfile.txt firstname.lastname@example.org:~/ Copy Directory From Local To Remote Shell $ scp -r ~/myfolder username@ip_address:~/folder_on_remote 1 $ scp -r ~/myfolder username@ip_address:~/folder_on_remote Shell $ scp … Continue reading scp (secure copy)
ContentsOverviewPausing The Terminal And Scrolling Through Past DataKilling Screen ProcessesOverview screen can be used as a terminal, to send and receive information from a serial port. Pausing The Terminal And Scrolling Through Past Data You can pause the output from screen with: Ctrl-A, Esc This enters copy mode. You can then use your mouse wheel or the … Continue reading screen
Find and replace, substitution, changing the format of dates, deleting lines are more info about the UNIX command-line program sed.
ContentsOverviewStatsOverview SimpleScreenRecorder is a great Linux program for capturing screen output. It can capture the entire screen, and window, follow the curser, or a arbitary rectangle. Stats Website http://www.maartenbaert.be/simplescreenrecorder/ Author Maarten Baert Like this:Like Loading...
ContentsOverviewInstallationConnecting Two COM Ports TogetherOverview socat is a very powerful utility program for estabilishing bi-directional data streams between two data sinks/sources. It can be used for creating two virtual COM ports that relay information to each other. Installation On Debian-based operating systems (such as Ubuntu), you can type: Installing socat... Shell sudo apt-get install socat … Continue reading socat
The tar program is used to package/unpackage files using the .tar file format. It can also decompress/compress files at the same time using gzip.
Information about Valgrind, a tool for tracking down memory and threading-related bugs in your application.
Posted: January 8th, 2014 at 8:15 pm
Last Updated on: July 5th, 2017 at 11:30 am