Monday, April 23, 2007

common Linux commands

unpack archive:
tar -zxvf file_name.tar.gz
tar -xvf file_name.tar

create archive:
tar -czvvf file_name.tar.gz folder_name

copy files:
cp source_file1 source_file2 ... destination_folder/
cp -r source_folder destination_folder/ (-r for recursive -f force)
scp filename_path user@hostname:/destination/path/ (-r recursive -f force)

make directory:
mkdir folder_name

remove file(s):
rm file_name (-r recursive 'use when removing directories', -f to force 'when you dont want to keep answering yes to all the prompts)

No comments: