Linux Guide/File Manipulation

Previous Up Next

ls
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)

edit
rsync -ave ssh <remote_server>:<syntaxhighlight_path> <dest_dir>

Example:

rsync -ave ssh root@192.168.1.252:/tmp/myfile .