cd /home |
enter to directory '/ home' |
cd .. |
go back one level |
cd ../.. |
go back two levels |
cd |
go to home directory |
cd ~utente |
go to home directory |
cd - |
go to previous directory |
pwd |
show the path of work directory |
ls |
view files of directory |
ls -F |
view files of directory |
ls -l |
show details of files and directory |
ls -a |
show hidden files |
ls *[0-9]* |
show files and directory containing numbers |
tree |
show files and directories in a tree starting from root |
lstree |
|
mkdir dir1 |
create a directory called 'dir1' |
mkdir dir1 dir2 |
create two directories simultaneously |
mkdir -p /tmp/dir1/dir2 |
create a directory tree |
rm -f file1 |
delete file called 'file1' |
rmdir dir1 |
delete directory called 'dir1' |
rm -rf dir1 |
remove a directory called 'dir1' and contents recursively |
rm -rf dir1 dir2 |
remove two directories and their contents recursively |
mv dir1 new_dir |
rename / move a file or directory |
cp file1 file2 |
copying a file |
cp dir/* . |
copy all files of a directory within the current work directory |
cp -a /tmp/dir1 . |
copy a directory within the current work directory |
cp -a dir1 dir2 |
copy a directory |
ln -s file1 lnk1 |
create a symbolic link to file or directory |
ln file1 lnk1 |
create a physical link to file or directory |
touch -t 0712250000 fileditest |
modify timestamp of a file or directory - (YYMMDDhhmm) |