Skip to content

Instantly share code, notes, and snippets.

@vincentopensourcetaiwan
Created July 25, 2012 05:15
Show Gist options
  • Save vincentopensourcetaiwan/3174522 to your computer and use it in GitHub Desktop.
Save vincentopensourcetaiwan/3174522 to your computer and use it in GitHub Desktop.
copy id_rsa.pub from current directory to remote drive
$ scp id_rsa.pub vincent@192.168.1.5:/users/vincent/documents
#copy id_rsa.pub from current directory to remote drive
$ chmod a+rwx
# add permissions to all
$ touch file_name
# create a file
$ rm -rf letters/
# delete directory
# -r recursive
$ w
# show who is logged on and what they are doing
$ uname -a
# print system information
# -a print all information
$ pwd
# displays the name of the current working directory
$ ll -lah
# -l Shows you huge amounts of information (permissions, owners, size, and when last modified.)
# -a Shows you all files, even files that are hidden
# -h print sizes in human readable format
$ ll .
# shows current directory information
$ ll ..
# shows parent directory information
$ tree .
# shows current directory information in tree format
$ sudo apt-get install tree
# install tree
$ cat big-file.txt
# Concatenate FILE(s), or standard input, to standard output.
$ cat big-file.txt | more
# output "cat big-file.txt" to more command
$ cat big-file.txt | wc -w
# count the number of words in the big-file.txt
$ cat big-file.txt | grep software
# find the software in the big-file.txt
$ tree . > data.txt
# get current directory information and output it data.txt file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment