Linux Guide/File Manipulation
Jump to navigation Jump to search
- 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 firstname.lastname@example.org:/tmp/myfile .