Sends file contents to standard output. This is a way to list the contents of short files to the screen. It works well with piping.

cat .bashrc

Sends the contents of the “.bashrc” file to the screen.

cd

Change directory

cd /home

Change the current working directory to /home. The ‘/’ indicates relative to root, and no matter what directory you are in when you execute this command, the directory will be changed to “/home”.

cd httpd

Change the current working directory to httpd, relative to the current location which is “/home”. The full path of the new working directory is “/home/httpd”.

cd ..

Move to the parent directory of the current directory. This command will make the current working directory “/home.

cd ~

Move to the user’s home directory which is “/home/username”. The ‘~’ indicates the users home directory.

cp

Copy files

cp myfile yourfile

Copy the files “myfile” to the file “yourfile” in the current working directory. This command will create the file “yourfile” if it doesn’t exist. It will normally overwrite it without warning if it exists.

cp -i myfile yourfile

With the “-i” option, if the file “yourfile” exists, you will be prompted before it is overwritten.

cp -i /data/myfile .

Copy the file “/data/myfile” to the current working directory and name it “myfile”. Prompt before overwriting the file.

cp -dpr srcdir destdir

Copy all files from the directory “srcdir” to the directory “destdir” preserving links (-p option), file attributes (-p option), and copy recursively (-r option). With these options, a directory and all it contents can be copied to another directory.

dd

dd if=/dev/hdb1 of=/backup/

Disk duplicate. The man page says this command is to “Convert and copy a file”, but although used by more advanced users, it can be a very handy command. The “if” means input file, “of” means output file.

df

Show the amount of disk space used on each mounted filesystem.

less

less textfile

Similar to the more command, but the user can page up and down through the file. The example displays the contents of textfile.

ln

Creates a symbolic link to a file.

ln -s test symlink

Creates a symbolic link named symlink that points to the file test Typing “ls -i test symlink” will show the two files are different with different inodes. Typing “ls -l test symlink” will show that symlink points to the file test.

locate

A fast database driven file locator.

slocate -u

This command builds the slocate database. It will take several minutes to complete this command. This command must be used before searching for files, however cron runs this command periodically on most systems.

locate whereis

Lists all files whose names contain the string “whereis”.

logout

Logs the current user off the system.

ls

List files

ls

List files in the current working directory except those starting with . and only show the file name.

ls -al

List all files in the current working directory in long listing format showing permissions, ownership, size, and time and date stamp

more

Allows file contents or piped output to be sent to the screen one page at a time.

more /etc/profile

Lists the contents of the “/etc/profile” file to the screen one page at a time.

ls -al |more

Performs a directory listing of all files and pipes the output of the listing through more. If the directory listing is longer than a page, it will be listed one page at a time.

mv

Move or rename files

mv -i myfile yourfile

Move the file from “myfile” to “yourfile”. This effectively changes the name of “myfile” to “yourfile”.

mv -i /data/myfile .

Move the file from “myfile” from the directory “/data” to the current working directory.

pwd

Show the name of the current working directory

more /etc/profile

Lists the contents of the “/etc/profile” file to the screen one page at a time.

Quick Search

Language / Dil Seçin

Disclaimer:

Qnapsupport.net is Personal Website established to help both endusers and Qnap technical staff. Documents are based on the information provided to us and my personal experience. Me or QNAP Systems Inc. does not assume any responsibility or liability for the advice given and shall not be liable for any direct, indirect, special, incidental or consequential damages in connection with the use of this information. Always back up your data. For professional support, please request help from Qnap offical technical team; https://helpdesk.qnap.com/index.php?/Tickets/Submit

+"Qnap Reboot Itself Randomly Even There is No Problem on RAID, What Should I Do?" Document extended
http://qnapsupport.net/qnap-reboot-itself-randomly-even-there-is-no-problem-on-raid-what-should-i-do/

+"Error Page Not Found Or The Web Server Is Currently Unavabile. Please Contact The Website Admin For Help" Document added;
http://qnapsupport.net/error-page-not-found-or-the-web-server-is-currently-unavabile-please-contact-the-website-admin-for-help/

+"How To Purchase And Use myQNAPcloud SSL Certificates & How To Use SSL Certificates" Document Added;
http://qnapsupport.net/how-to-purchase-and-use-myqnapcloud-ssl-certificates-how-to-use-ssl-certificates/

+"Load Balance Setup: Which Is The Best Port Trunking Option?" Document Added;
http://qnapsupport.net/load-balance-setup-which-is-the-best-port-trunking-option/

+"PhotoStation Errors and How To Reinstall Database; Thumbnail Generation Failed A Few Photos, No Folder View And Albums Empty After Firmware, Photo Station Albums Gone, Photostation Not Showing All Files" Document Added;
http://qnapsupport.net/photostation-errors-and-how-to-reinstall-database/?lang=en

+"Container Station Only Shows My Nas And The Refresh İcon, But No Folders At All… How To Fix" Document added;
http://qnapsupport.net/container-station-only-shows-my-nas-and-the-refresh-icon-but-no-folders-at-all-how-to-fix/?lang=en

+"Qnap Unable To Play MKV Files Anymore After Firmware Update And Gives “The Video Does Not Support Online Playback or Does Not Exist” Error?" Docuemnt Added;
http://qnapsupport.net/qnap-unable-to-play-mkv-files-anymore-after-firmware-update-and-gives-the-video-does-not-support-online-playback-or-does-not-exist-error/?lang=en

+"Qnap Download Station Stops Working Suddeny And Gives This Error; Download Station Is Currently Offline" Document Added;
http://qnapsupport.net/qnap-download-station-stops-working-suddeny-and-gives-download-station-is-currently-offline/?lang=en