mkdir directoryname
# Make directory
touch filename
# Make files
cd dirname
# Changing the directory
cd ..
# Going back to previous directory
cd
# Going to home Directory
mv filename /Directory/filename
# It will move the file from somewhere to other
cp filename /directory/filename
# It will copy the file from on to other
less filename
# This will print contents inside the file but only one page per time
ls -a && ls -al
# Prints all the files or folders inside directory even the hidden ones, same prints permissions for all even for hidden
man command
# To see manual-pages of the command or another way for command --help
locate filename
# To locate the file
df
# Used to see disk space to see space in megabytes df -m
uname -a
# See the distro details
hostname
# To see the name of the host or wifi
hostname -i
# To see ip address
chmod
# chmod +x filename to make file executable or chmod 777 filename to give file root permission
There might be more but these were upto my knowledge
touch command is the most basic one which many people misunderstand. The touch command is used to modify timestamps on a file, but it actually gives the effect of creating a new file.
touch filename - will create an empty file
touch -a filename - change the access time only
touch -c filename - if the file does not exist, do not create it
touch -d filename - update the access and modification times
touch -m filename - change the modification time only
touch -r - use the access and modification timestamp of file
touch -t - creates a file using a specified time
it creates a file and also can modify the timestamps
Nice, but misses out few
Like:
There might be more but these were upto my knowledge
Thanks for sharing this!
touch
command is the most basic one which many people misunderstand. Thetouch
command is used to modify timestamps on a file, but it actually gives the effect of creating a new file.touch filename - will create an empty file
touch -a filename - change the access time only
touch -c filename - if the file does not exist, do not create it
touch -d filename - update the access and modification times
touch -m filename - change the modification time only
touch -r - use the access and modification timestamp of file
touch -t - creates a file using a specified time
it creates a file and also can modify the timestamps
Exactly!
most of the people will not use these options & they won't bother about timestamps, so I haven't mentioned them previously.