Linux Guide/File Manipulation
From Wikibooks, open books for an open world
- lists all files and directories in the current directory.
- mv <file> <to>
- move <file> to destination <to>.
- rm <file>
- remove <file>.
- cd <dir>
- change the current directory to <dir>.
- cat <file>
- concatenate files and show them on standard output, text files work best:)
- find [path...] [expression]
- search for files in the given path
- xargs <command>
- takes input from stdin and formats it as the arguments to another program. For instance, to delete all files with an ending ~, write find . -name "*~" | xargs rm
Copy file from remote system (rsync)
rsync -ave ssh <remote_server>:<source_path> <dest_dir>
rsync -ave ssh email@example.com:/tmp/myfile .