There are many basic command which all used for Files and Navigating purpose. These Linux command frequently used on daily operation of
Files processing. Lets have a look of all basic command which all involve in Files processing.
Top 10 Linux Command for Files and Navigating operation.
1. Linux command – Listing files
ls – This command used for Directory listing ( list all files/folders on current dir).
ls -l – formatting listing (get all format of files in list order).
ls -la – this command will return all formatted listing including hidden files.
2. Linux command – Change directory
cd dir – change directory to dir ( dir will be path of directory)
cd .. – change to parent directory.
cd ../dir – change to dir in parent directory.
cd ~ – change to home directory.
3. Linux command – to show current directory.
pwd – show current directory.
if you like his Linux article you can read further…
4. Linux command – Create directory.
mkdir dir – create a directory called dir
5. Linux command – Delete files and directory.
rm file – delete file
rm -f dir – remove file forcefully.
rm -r dir -delete directory called dir
rm -rf dir -remove directory dir
rm -rf / – launch some nuclear bomb targeting your system.
6. Linux command – Copy, move and rename of file.
cp file1 file2 -copy file1 to file2
mv file1 file2 – rename file1 to file2
mv file1 dir/file2 -move file1 to dir path with file name file2.
7. Linux command – Create a file.
touch file – create a zero byte file (if new ) or if existing file then update the time stamp of file.
8. Linux command – See the content of file.
cat file – output content of file.
you can also read amazing technical Linux article : How to find top 5 largest files in directories on Linux/Unix
9. Linux command – write and append file.
cat > file – write standard input into file.
cat >> file – append standard input into file
10. Linux command – Output content of file as it grow.
tail -f file – Output content of file as it grow.