Skip to content

Instantly share code, notes, and snippets.

@alancoleman
Last active December 19, 2016 11:47
Show Gist options
  • Save alancoleman/6037886 to your computer and use it in GitHub Desktop.
Save alancoleman/6037886 to your computer and use it in GitHub Desktop.
A list of basic Konsole commands for reference
// Show the details of installed software, in this instance, Firefox
sudo apt-cache show firefox
sudo apt-cache show apache2
// Change the name of a file in a directory, using sudo because the directory is www
sudo mv alan_test.tx alan.txt
// Switch to root user
sudo su
// Copy a file
cp origional.php origional_copy.php
// Rename a file
rename origional.php origional_renamed.php
// View permissions in Octal mode
$ stat -c %a file
// Changing file permissions. See http://www.ss64.com/bash/chmod.html for permission values
chmod 700 myfile
// Bit version of machine
uname -m
// Count the lines in a file
wc -l <filename>
// Count the words in a file
wc -w <filename>
// Create a symbolic link of ../workspace in public_html. Executed from directory of both files
ln -s ../workspace public_html
// Unzip example.zip into example directory
unzip example.zip -d example
// show hostname
hostname
// show fully qualified domain name (FQDN
hostname -f
// What Linux distrorunning
cat /etc/*release*
// Update system (Cent OS)
sudo yum update
// Empty a file of contents
truncate -s 0 filename
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment