Input / Output
Everything in linux was describe as file.
File Operation, you can make a simple test in your own machine.
- ls
$ ls -al $ ls -R $ ls -lh $ ls -d $ ls -g $ ls -n $ ls -p
- mv
# prompt whether if coverd $ mv -i a_o.file a_a.file # force coverd $ mv -f a_o.file a_a.file # mv before back up $ mv log1.txt -b log2.txt
- cp
# cp every file was matched file beginning $ cp file* /directory/subdirectory # cp file end with jpg $ cp file*.jpg /directory/subdirectory # Copy an entire directory structure into another location $ cp -R xxx/yy/ /zz/ee # $ cp ~/pictures/picture-01.jpg ~/pictures/picture-02.jpg ~/picture-backup # Creating Symbolic Links Instead Of Copying Data $ cp -s file.txt file2.txt $ cp -R -s ~/myfiles ~/myfiles2 # Copy all files ending in .txt into the newdir directory, but only if the files do not already exist in the new directory, or if the files being copied are newer. $ cp -u *.txt newdir # $ cp --backup origfile newfile # Create hard links to files instead of copying them $ cp -l xx.txt yy.txt
- touch
$ touch
- rm
$ rm
- echo
$ echo
- cat
$ cat
- dd
$ dd
- open
$ open
- file
$ file filename
- compress/uncompress
- zip/unzip
$
- tar
$
- alz
$
- 7z
$
Permission :
- chmod
$ chmod
- chown
$ chown
Reference :