Basic command require to work on file on serve

Often we need to know the description of our folder and file on terminal
that can be do by using

ls -l

this will display something like –

ls -l filename_backup.tar
-rw-rw-r-- 1 User_name User_name 7792640 Feb 21 01:30 filename_backup.tar

where

1). -rw-rw-r– ==> is the permission for this file.
2). 1 ==>is the sequence no.
3). User_name User_name ==> is Username
4). 7792640 ==> is size of file in bit.
5). Feb 21 01:30 ==> is date of file creation
6). filename_backup.tar ==> is file name

in some cases we need file size a/c to our conventions like in KB, Mb etc
for that we have-

ls -lh filename_backup.tar

-rw-rw-r-- 1 User_name User_name 7.5M Feb 21 01:30 filename_backup.tar

here

7.5M is size of our file

Note:- filename_backup.tar is the file_name

Copy file from server to local

scp User_name@104.236.81.6:/backup/.tmp/filename_backup.tar /home/user/cp_btx.tar

Have a nice Day

Leave a Reply

Your email address will not be published. Required fields are marked *